• 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: Axel Luttgens <email@hidden>
  • Date: Fri, 27 May 2011 23:59:57 +0200

Le 27 mai 2011 à 22:58, Thomas Fischer a écrit :

>
> Am 27.05.2011 um 13:20 schrieb Shane Stanley:
>
>> On 27/5/11 6:26 PM, "Thomas Fischer" <email@hidden> wrote:
>>
>>> the Finder is the authority for the existence of files
>>
>> What makes you say that?
>
> Because the Finder knows if a file exists, AppleScript doesn't.
> (And System Events does too but for other files or so…)

Hello Thomas,

Taking your previous example, perhaps could this one be of some help:

	try
		POSIX file "/RemoteDesk/GDZ-METS/METS/Jochen.txt" as alias
		-- file exists; continue here with that file
	on error
		-- file doesn't exist; handle that case here
	end try

This is just a variant of a long-standig trick allowing to check for the existence of a file without resorting to the Finder or any other application implementing an "exists" command.

HTH,
Axel

 _______________________________________________
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

References: 
 >Re: tell app, name in string var (From: Shane Stanley <email@hidden>)
 >Re: tell app, name in string var (From: Thomas Fischer <email@hidden>)

  • Prev by Date: Re: Load Script
  • Next by Date: Re: Load Script
  • Previous by thread: Re: tell app, name in string var
  • Next by thread: Re: tell app, name in string var
  • Index(es):
    • Date
    • Thread