Re: Rep: System Events versus Finder
Re: Rep: System Events versus Finder
- Subject: Re: Rep: System Events versus Finder
- From: KOENIG Yvan <email@hidden>
- Date: Fri, 29 Feb 2008 19:16:36 +0100
Le 29 févr. 2008 à 18:35, has a écrit :
On 29 Feb 2008, at 14:44, KOENIG Yvan wrote:
The lazy guy is glad to be able to make a new item at end of its
folders but
this time I want to duplicate a file
I think you're out of luck. While System Events' 'move' command
works okay, 'duplicate' just gives an error:
Thank you
Alas move is not working for me because I'm running 10.4.11 ;-)
set source to POSIX path of "Macintosh
HD:Users:yvankoenig:Desktop:calcDate.scpt"
set dest to POSIX path of "Macintosh
HD:Users:yvankoenig:Desktop:myFolder:"
tell application "System Events"
move disk item source to end of disk items of disk item dest
end tell
Report is:
(*'/Users/yvankoenig/Desktop/calcDate.scpt'*)
(*'/Users/yvankoenig/Desktop/myFolder'*)
tell application "System Events"
move disk item "'/Users/yvankoenig/Desktop/calcDate.scpt'" to end of
every disk item of disk item "'/Users/yvankoenig/Desktop/myFolder'"
"Erreur dans System Events : NSReceiverEvaluationScriptError: 4"
set source to POSIX path of "Macintosh
HD:Users:yvankoenig:Desktop:calcDate.scpt"
set dest to POSIX path of "Macintosh
HD:Users:yvankoenig:Desktop:myFolder:"
log source
log dest
tell application "System Events"
move disk item source to end of disk items of disk item dest
end tell
(*/Users/yvankoenig/Desktop/calcDate.scpt*)
(*/Users/yvankoenig/Desktop/myFolder/*)
tell application "System Events"
move disk item "/Users/yvankoenig/Desktop/calcDate.scpt" to end of
every disk item of disk item "/Users/yvankoenig/Desktop/myFolder/"
end tell
No error message but it does nothing.
Same behaviour with:
set source to "Macintosh HD:Users:yvankoenig:Desktop:calcDate.scpt"
set dest to "Macintosh HD:Users:yvankoenig:Desktop:myFolder:"
tell application "System Events"
move disk item source to end of disk items of disk item dest
end tell
I will post a report (for the 10.5 behaviour).
Yvan KOENIG _______________________________________________
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