Re: "try" broke??? II
Re: "try" broke??? II
- Subject: Re: "try" broke??? II
- From: Robert Poland <email@hidden>
- Date: Tue, 06 Nov 2012 16:16:47 -0700
An interesting observation;
The following script will delete in a normal window and will not error with a CD.
tell application "Finder" activate tell window 1 -- clears out Finder idiosyncrasies tell application "Finder" set winTarget to target of front window as alias end tell set fileList to list folder winTarget with invisibles tell application "System Events" to delete (every file of winTarget whose name = ".DS_Store") end tell end tell
On 6 Nov 2012, at 22:26, Robert Poland < email@hidden> wrote: Hi,
Running from Smile AND Applescript Editor, when pointed at a CD the following script errors out and won't run;
tell application "Finder" activate tell window 1 -- clears out Finder idiosyncrasies tell application "Finder" -- used here and at end set winTarget to target of front window as alias end tell set fileList to list folder winTarget with invisibles try if fileList contains ".DS_Store" then delete item ".DS_Store" end if end try end tell end tell
Robert Poland - Fort Collins, CO
|
_______________________________________________
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