Professional Web Applications Themes

applescript error: can't find file - Mac Applications & Software

I try to atomaticaly make a file invisible and I found the follwing script to do that ([url]http://groups.google.nl/groups?hl=nl&lr=&ie=UTF-8&threadm=etp-0401990746470001%40ppp253.bcpl.net&rnum=5&prev=/groups%3Fq%3Dvisible%2Bfile%2Bapplescript%26hl%3Dn l%26lr%3D%26ie%3DUTF-8%26selm%3Detp-0401990746470001%2540ppp253.bcpl.net%26rnum%3D5[/url]) the first part of this script has a test to try whetther the file is not missing: tell application "Finder" try -- if you moved or deleted the target file, you'll get a beep -- info for returns a string of file or folder attributes --you can watch it work by turning on the Event Log info for "Macintosh:test Ÿ:this will be hidden:visibility toggle" on error beep end try And although the file and path are correct, I still hear a ...

  1. #1

    Default applescript error: can't find file

    I try to atomaticaly make a file invisible and I found the follwing
    script to do that ([url]http://groups.google.nl/groups?hl=nl&lr=&ie=UTF-8&threadm=etp-0401990746470001%40ppp253.bcpl.net&rnum=5&prev=/groups%3Fq%3Dvisible%2Bfile%2Bapplescript%26hl%3Dn l%26lr%3D%26ie%3DUTF-8%26selm%3Detp-0401990746470001%2540ppp253.bcpl.net%26rnum%3D5[/url])

    the first part of this script has a test to try whetther the file is
    not missing:

    tell application "Finder"
    try
    -- if you moved or deleted the target file, you'll get a beep
    -- info for returns a string of file or folder attributes
    --you can watch it work by turning on the Event Log
    info for "Macintosh:test Ÿ:this will be hidden:visibility
    toggle"
    on error
    beep
    end try

    And although the file and path are correct, I still hear a beep. I can
    open the file with this script ( so open ".." instead of info for
    ".."), so applescript should be able to find the file. If I don't use
    try, an error pops up saying applescript can't find the file
    (translated from dutch).
    I tried some other commands from the script's extra folder but none of
    them worked. What Am I doing wrong:

    Imac DV 400: OS 9.2.2.: Applescript 1.7
    wessel Guest

  2. #2

    Default applescript error: can't find file

    I try to atomaticaly make a file invisible and I found the follwing
    script to do that ([url]http://groups.google.nl/groups?hl=nl&lr=&ie=UTF-8&threadm=etp-0401990746470001%40ppp253.bcpl.net&rnum=5&prev=/groups%3Fq%3Dvisible%2Bfile%2Bapplescript%26hl%3Dn l%26lr%3D%26ie%3DUTF-8%26selm%3Detp-0401990746470001%2540ppp253.bcpl.net%26rnum%3D5[/url])

    the first part of this script has a test to try whetther the file is
    not missing:

    tell application "Finder"
    try
    -- if you moved or deleted the target file, you'll get a beep
    -- info for returns a string of file or folder attributes
    --you can watch it work by turning on the Event Log
    info for "Macintosh:test Ÿ:this will be hidden:visibility
    toggle"
    on error
    beep
    end try

    And although the file and path are correct, I still hear a beep. I can
    open the file with this script ( so open ".." instead of info for
    ".."), so applescript should be able to find the file. If I don't use
    try, an error pops up saying applescript can't find the file
    (translated from dutch).
    I tried some other commands from the script's extra folder but none of
    them worked. What Am I doing wrong:

    Imac DV 400: OS 9.2.2.: Applescript 1.7
    wessel Guest

  3. #3

    Default Re: applescript error: can't find file

    In article <e929d40a.0306250518.1273186aposting.google.com >,
    [email]vanhorzentnw.tudelft.nl[/email] (wessel) wrote:
    > I tried some other commands from the script's extra folder but none of
    > them worked. What Am I doing wrong:
    Try using the "exist" command in the Finder to determine whether the
    file exists or not.

    Patrick
    --
    Patrick Stadelmann <Patrick.Stadelmannunine.ch>
    Patrick Stadelmann Guest

  4. #4

    Default Re: applescript error: can't find file

    In article <e929d40a.0306250518.1273186aposting.google.com >,
    [email]vanhorzentnw.tudelft.nl[/email] (wessel) wrote:
    > I tried some other commands from the script's extra folder but none of
    > them worked. What Am I doing wrong:
    Try using the "exist" command in the Finder to determine whether the
    file exists or not.

    Patrick
    --
    Patrick Stadelmann <Patrick.Stadelmannunine.ch>
    Patrick Stadelmann Guest

  5. #5

    Default Re: applescript error: can't find file

    > > I tried some other commands from the script's extra folder but none of
    > > them worked. What Am I doing wrong:
    >
    > Try using the "exist" command in the Finder to determine whether the
    > file exists or not.
    >
    Don't know the command you mean, but I am curtain that the file
    exists. I can select the file with a simple script and open the file
    replace it and so forth. the problem is in the command info for
    wessel Guest

  6. #6

    Default Re: applescript error: can't find file

    > > I tried some other commands from the script's extra folder but none of
    > > them worked. What Am I doing wrong:
    >
    > Try using the "exist" command in the Finder to determine whether the
    > file exists or not.
    >
    Don't know the command you mean, but I am curtain that the file
    exists. I can select the file with a simple script and open the file
    replace it and so forth. the problem is in the command info for
    wessel Guest

  7. #7

    Default Re: applescript error: can't find file

    [Narrowed down follow-ups to <news:alt.comp.lang.applescript> only. No
    need to crosspost.]

    In article <e929d40a.0306250914.4852ec60posting.google.com >,
    [email]vanhorzentnw.tudelft.nl[/email] (wessel) wrote:

    [...]
    > > Try using the "exist" command in the Finder to determine whether the
    > > file exists or not.
    > >
    > Don't know the command you mean
    Then take a step back. You need to first learn about AppleScript
    dictionaries. Every application has one. It tells you what and how the
    app can be scripted.

    To view an app's AppleScript dictionary, use Script Editor's "Open
    Dictionary" (or something like that) command.

    In the Finder's dictionary you'll learn about its "exists" command.


    [Note follow-ups]

    --
    Free and shareware at <http://www.euronet.nl/~tekelenb/software/>
    Sander Tekelenburg Guest

  8. #8

    Default Re: applescript error: can't find file

    [Narrowed down follow-ups to <news:alt.comp.lang.applescript> only. No
    need to crosspost.]

    In article <e929d40a.0306250914.4852ec60posting.google.com >,
    [email]vanhorzentnw.tudelft.nl[/email] (wessel) wrote:

    [...]
    > > Try using the "exist" command in the Finder to determine whether the
    > > file exists or not.
    > >
    > Don't know the command you mean
    Then take a step back. You need to first learn about AppleScript
    dictionaries. Every application has one. It tells you what and how the
    app can be scripted.

    To view an app's AppleScript dictionary, use Script Editor's "Open
    Dictionary" (or something like that) command.

    In the Finder's dictionary you'll learn about its "exists" command.


    [Note follow-ups]

    --
    Free and shareware at <http://www.euronet.nl/~tekelenb/software/>
    Sander Tekelenburg Guest

  9. #9

    Default Re: applescript error: can't find file

    In article <e929d40a.0306260554.488a045posting.google.com> ,
    [email]vanhorzentnw.tudelft.nl[/email] (wessel) wrote:
    > I see what you guys mean no. I tried excist and it returned "true". So
    > no My problem could be formulated as how to install new osaxen. I
    > placed them in the apple's "script extra" folder. Then the commadn
    > shpould be reconnized not?
    In my previous message I suggested follow-ups to only go to
    <news:alt.comp.lang.applescript>. Somehow you managed to ignore that,
    without providing any reason.

    It is considered rude to crosspost without a good reason (although not
    as rude as multiposting). Subscribe to <news:news.newusers.questions> to
    learn about Usenetiquete.


    Try again (or don't).

    --
    Free and shareware at <http://www.euronet.nl/~tekelenb/software/>
    Sander Tekelenburg Guest

  10. #10

    Default Re: applescript error: can't find file

    In article <e929d40a.0306260554.488a045posting.google.com> ,
    [email]vanhorzentnw.tudelft.nl[/email] (wessel) wrote:
    > I see what you guys mean no. I tried excist and it returned "true". So
    > no My problem could be formulated as how to install new osaxen. I
    > placed them in the apple's "script extra" folder. Then the commadn
    > shpould be reconnized not?
    In my previous message I suggested follow-ups to only go to
    <news:alt.comp.lang.applescript>. Somehow you managed to ignore that,
    without providing any reason.

    It is considered rude to crosspost without a good reason (although not
    as rude as multiposting). Subscribe to <news:news.newusers.questions> to
    learn about Usenetiquete.


    Try again (or don't).

    --
    Free and shareware at <http://www.euronet.nl/~tekelenb/software/>
    Sander Tekelenburg Guest

  11. #11

    Default Re: applescript error: can't find file

    In article <e929d40a.0306250518.1273186aposting.google.com >,
    [email]vanhorzentnw.tudelft.nl[/email] (wessel) wrote:
    >the first part of this script has a test to try whetther the file is
    >not missing:
    >
    >tell application "Finder"
    > try
    > -- if you moved or deleted the target file, you'll get a beep
    > -- info for returns a string of file or folder attributes
    > --you can watch it work by turning on the Event Log
    > info for "Macintosh:test Ÿ:this will be hidden:visibility
    >toggle"
    > on error
    > beep
    > end try
    Should more more like

    if exists (the file) then
    do this
    else
    do that
    end if


    Simon Slavin Guest

  12. #12

    Default Re: applescript error: can't find file

    In article <e929d40a.0306250518.1273186aposting.google.com >,
    [email]vanhorzentnw.tudelft.nl[/email] (wessel) wrote:
    >the first part of this script has a test to try whetther the file is
    >not missing:
    >
    >tell application "Finder"
    > try
    > -- if you moved or deleted the target file, you'll get a beep
    > -- info for returns a string of file or folder attributes
    > --you can watch it work by turning on the Event Log
    > info for "Macintosh:test Ÿ:this will be hidden:visibility
    >toggle"
    > on error
    > beep
    > end try
    Should more more like

    if exists (the file) then
    do this
    else
    do that
    end if


    Simon Slavin Guest

  13. #13

    Default Re: applescript error: can't find file

    On Thu, 26 Jun 2003 23:54:32 +1000, wessel wrote
    (in message <e929d40a.0306260554.488a045posting.google.com> ):
    > I see what you guys mean no. I tried excist and it returned "true". So
    > no My problem could be formulated as how to install new osaxen. I
    > placed them in the apple's "script extra" folder. Then the commadn
    > shpould be reconnized not?
    1) in future, quote what your text refers to.

    2) in future, don't crosspost (particularly after someone sets the
    followups appropriately) unless you have some reason for doing so,
    which you should share.

    3) your original problem was that you hadn't asked the Finder to
    give 'info for' a _file_, you asked it for 'info for' a _string_.

    4) 'exists' does exactly what you originally claimed to be trying
    to achieve, which is why other posters suggested you use it. Once
    you know the file exists, then use 'info for' if you need to.

    5) Note followups!



    Have Fun
    Martin

    Martin Crisp Guest

  14. #14

    Default Re: applescript error: can't find file

    On Thu, 26 Jun 2003 23:54:32 +1000, wessel wrote
    (in message <e929d40a.0306260554.488a045posting.google.com> ):
    > I see what you guys mean no. I tried excist and it returned "true". So
    > no My problem could be formulated as how to install new osaxen. I
    > placed them in the apple's "script extra" folder. Then the commadn
    > shpould be reconnized not?
    1) in future, quote what your text refers to.

    2) in future, don't crosspost (particularly after someone sets the
    followups appropriately) unless you have some reason for doing so,
    which you should share.

    3) your original problem was that you hadn't asked the Finder to
    give 'info for' a _file_, you asked it for 'info for' a _string_.

    4) 'exists' does exactly what you originally claimed to be trying
    to achieve, which is why other posters suggested you use it. Once
    you know the file exists, then use 'info for' if you need to.

    5) Note followups!



    Have Fun
    Martin

    Martin Crisp Guest

Similar Threads

  1. Error: Could not find the file "flash.ocx"
    By MelaleucaMom in forum Macromedia Flash Player
    Replies: 0
    Last Post: March 15th, 10:41 PM
  2. File::Find
    By Douglas Harter in forum PERL Beginners
    Replies: 8
    Last Post: July 6th, 01:58 AM
  3. AppleScript
    By jcc31 webforumsuser@macromedia.com in forum Macromedia Freehand
    Replies: 3
    Last Post: January 22nd, 11:03 PM
  4. Director Player Error "can't find .dcr file"
    By invflow webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 2
    Last Post: December 2nd, 04:30 PM
  5. use of File::Find
    By William M West in forum PERL Beginners
    Replies: 1
    Last Post: November 6th, 05:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139