• 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
move with System Events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

move with System Events


  • Subject: move with System Events
  • From: "koenig.yvan" <email@hidden>
  • Date: Sat, 23 Nov 2013 17:13:53 +0100

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

  • Follow-Ups:
    • Re: move with System Events
      • From: Shane Stanley <email@hidden>
    • Re: move with System Events
      • From: Deivy Petrescu <email@hidden>
  • Prev by Date: Re: Find a line break followed by a lower case character
  • Next by Date: Re: move with System Events
  • Previous by thread: Re: Find a line break followed by a lower case character
  • Next by thread: Re: move with System Events
  • Index(es):
    • Date
    • Thread