Re: move with System Events
Re: move with System Events
- Subject: Re: move with System Events
- From: Deivy Petrescu <email@hidden>
- Date: Sat, 23 Nov 2013 21:38:26 -0500
I think it is System Events bug.
I also used posix paths and it did not work.
By the way, for certain tasks System Events accepts only posix path.
On Nov 23, 2013, at 11:13 , koenig.yvan <email@hidden> wrote:
> Hello
>
> In Mavericks, the function move a disk item is no longer flagged as UNAVAILABLE YET :
>
> move v : Move disk item(s) to a new location.
> move disk item : The disk item(s) to be moved.
> to location specifier : The new location for the disk item(s).
> → disk item
>
> So, I tried to use it.
>
> I ran this piece of code :
>
> set originalFile to choose file of type {"com.adobe.pdf"}
> --> alias "Macintosh HD:Users:yvankoenig:Desktop:azer50.pdf"
> set finalLocation to path to documents folder as text
>
> tell application "System Events"
> move disk item (originalFile as text) to folder finalLocation
> end tell
>
> As I got the path to the original file thru choose file, I'm sure that it really exists but the script returns an odd :
>
> error "Erreur dans System Events : Il est impossible d’obtenir disk item \"Macintosh HD:Users:yvankoenig:Desktop:azer50.pdf\"." number -1728 from disk item "Macintosh HD:Users:yvankoenig:Desktop:azer50.pdf"
>
> which is really foolish.
>
> Am I doing something wrong or is System Events playing the fool ?
>
> Yvan KOENIG (VALLAURIS, France) samedi 23 novembre 2013 17:13:41
>
>
> _______________________________________________
> 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
Deivy Petrescu
email@hidden
_______________________________________________
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