Re: Is Finder "update" command broken in OSX?
Re: Is Finder "update" command broken in OSX?
- Subject: Re: Is Finder "update" command broken in OSX?
- From: bill <email@hidden>
- Date: Sun, 28 Apr 2002 13:06:39 +0800
Corny,
In your original script, no error will occur in the first try:
--
tell application "Finder"
try
set fil1 to first file of folder ,
"HD:Users:me:Folding1:work:" whose name contains "logfile_"
fil1 as alias returning als1
--
Unless no file contains the name "logfile_". So the script won't execute the
on error part, so no updating.
-- this part is not executing
on error
update alias "HD:Users:me:Folding1:work:"
-- and every other construction I could think of
set fil1 to first file of folder ,
"HD:Users:me:Folding1:work:" whose name contains "logfile_"
fil1 as alias returning als1
end try
end tell
--
>
Would that be any different if run earlier, rather than later in the "on
>
error" block.
Sure, do the update first, then do the try & error test, it's different.
-- scenario 1
Tell "staff in a bank"
try
Say "give me $5,000 now"
On error
Declare you account book
Say "OK, here's my account book"
End try
End tell
--
-- scenario 2
Tell "staff in a bank"
Declare you account book
try
Say "give me $5,000 now"
On error
Say "OK, here's my account book"
End try
End tell
--
Imagine the difference? :)
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.