• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: tell app, name in string var
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tell app, name in string var


  • Subject: Re: tell app, name in string var
  • From: Thomas Fischer <email@hidden>
  • Date: Fri, 27 May 2011 10:26:10 +0200

Hi,

thanks to all who answered.
The different versions of coercions  ("as alias", "as text") seem to hint at some sort of additional evaluation taking place.
But actually it appears as buggy support of POSIX paths by the Finder.

Background of this small exercise is that I need a new file for a shell script, so I check for files until I find a name that isn't taken. In this context it is natural to work with POSIX paths, and the Finder is the authority for the existence of files...

Anyway, from the different hints I finally came up with the following:

set newFile to "/RemoteDesk/GDZ-METS/METS/Jochen.txt"
tell application "Finder"
exists my (POSIX file newFile)
end tell

and this works without errors!
So one has to wrestle the POSIX file out of the Finder's hands (
exists AppleScript's (POSIX file newFile)
works as well) and then let the Finder check its existence.
So something is broken in the interaction of the Finder with the "StandardAdditions" OSAX, which implements POSIX. 

Cheers
Thomas
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: tell app, name in string var
      • From: Zack Jarrett <email@hidden>
    • Re: tell app, name in string var
      • From: Shane Stanley <email@hidden>
    • Re: tell app, name in string var
      • From: KOENIG Yvan <email@hidden>
References: 
 >Re: tell app, name in string var (From: tom wible <email@hidden>)
 >Re: tell app, name in string var (From: Thomas Fischer <email@hidden>)
 >Re: tell app, name in string var (From: Jan-Bultereys <email@hidden>)
 >Re: tell app, name in string var (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: another obscure error message
  • Next by Date: Re: tell app, name in string var
  • Previous by thread: Re: tell app, name in string var
  • Next by thread: Re: tell app, name in string var
  • Index(es):
    • Date
    • Thread