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: Cornwall <email@hidden>
- Date: Sat, 27 Apr 2002 22:18:49 -0700
On Saturday, April 27, 2002, at 10:06 PM, bill wrote:
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
Actually it will error on the last line above, because "logfile_07" no
longer exists. It has been replaced by "logfile_08" so the coercion to
alias doesn't work and throws an error.
While I can see the point you are making, the following script works
perfectly well - except for the window opening part :-\
tell application "Finder"
try
set fil1 to first file of folder ,
"HD:Users:me:Folding1:work:" whose name contains "logfile_"
set fil2 to first file of folder ,
"HD:Users:me:Folding2:work:" whose name contains "logfile_"
fil1 as alias returning als1
fil2 as alias returning als2
on error
open folder "HD:Users:me:Folding1:work:"
open folder "HD:Users:me:Folding2:work:"
delay 1
close window "work"
close window "work"
set fil1 to first file of folder ,
"HD:Users:me:Folding1:work:" whose name contains "logfile_"
set fil2 to first file of folder ,
"HD:Users:me:Folding2:work:" whose name contains "logfile_"
fil1 as alias returning als1
fil2 as alias returning als2
end try
end tell
tell application "TextEdit"
activate
open fil1
open fil2
end tell
Thanks
Corny
_______________________________________________
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.