Re: System Events Bug
Re: System Events Bug
- Subject: Re: System Events Bug
- From: Deivy Petrescu <email@hidden>
- Date: Wed, 9 Apr 2003 20:08:55 -0400
On Wednesday, April 9, 2003, at 07:04 PM, John Delacour wrote:
I'm been driven mad by this for two hours and finally discovered what
looks like me to be a frightful bug.
This works:
set f to alias folder_path
--> alias "dx:Users:jd:live_folder2:"
set s to alias script_path
--> alias "dx:Users:jd:Library:Scripts:Folder Action
tell app "System Events"
Scripts:live_folder.scpt"
return {f, s}
set folder actions enabled to true
attach action to f using s
end
But the routine below doesn't. In other words alias "x" is not the
same as alias "x" of application "System Events" !!!
tell app "System Events"
try
set f to alias folder_path
set s to alias script_path
set folder actions enabled to true
attach action to f using s
on error e
return {e, return, f, s}
end
end
--> {"NSReceiversCantHandleCommandScriptError", "
", alias "dx:Users:jd:live_folder2" of application "System Events",
alias "dx:Users:jd:Library:Scripts:Folder Action
Scripts:live_folder.scpt" of application "System Events"}
It is not a bug. Or if it is, it is an old bug.
Both System Events and Finder appropriate aliases. After all the files,
folders, etc are Finder's items or SE's items.
Same thing happens with lists.
Regards
Deivy Petrescu
http://www.dicas.com/
_______________________________________________
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.