• 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: Is Finder "update" command broken in OSX?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Is Finder "update" command broken in OSX?
      • From: Cornwall <email@hidden>
    • Re: Is Finder "update" command broken in OSX?
      • From: Cornwall <email@hidden>
References: 
 >Re: Is Finder "update" command broken in OSX? (From: Cornwall <email@hidden>)

  • Prev by Date: Re: Is Finder "update" command broken in OSX?
  • Next by Date: Re: Is Finder "update" command broken in OSX?
  • Previous by thread: Re: Is Finder "update" command broken in OSX?
  • Next by thread: Re: Is Finder "update" command broken in OSX?
  • Index(es):
    • Date
    • Thread