Questions on Applescript and Cyberduck

The Cyberduck forums have moved to Google Groups, this forum is read only.
brandon_r87
Harmless
Posts: 2
Joined: Thu Sep 17, 2009 6:23 am

Questions on Applescript and Cyberduck

Postby brandon_r87 » Thu Sep 17, 2009 6:36 am

Hello,

I'm trying to write an Applescript that will upload the files I've selected to my ftp server and I'm having several issues. I'm currently running Cyberduck 3.3b2 on Snow Leopard. The first error I get is at make new browser. The error is "The handler some object is not defined." If I comment out lines related to that, my script runs without error but doesn't seem to actually do anything. I added in a dialog to display working folder, but I get an error that Cyberduck can't get the current working folder. It seems to me that its not connecting, but I don't know that for sure. Is there a way I can get the script to tell me if it was successful in connecting?

Thanks,
Brandon

Code: Select all

-- connect to ftp
tell application "Cyberduck"
   set theServer to "xxxxxx"
   set theUser to "xxxxxx"
   set thePassword to "xxxxxx"
   set theProtocol to "ftp"
   set theUploadFolder to "/music"
   
   activate
   --set theBrowser to (make new browser) --Applescript Error: Cyberduck got an error: The handler some object is not defined.
   --tell (theBrowser)
   connect to theServer with protocol theProtocol as user theUser with password thePassword with initial folder theUploadFolder
   --display dialog browser working folder -- Cyberduck got an error: Can't get working folder
   --end tell
end tell

-- upload the selected songs
tell application "iTunes"
   if selection is not {} then
      set sel to a reference to selection
      repeat with aTrack in sel
         set aArtist to (get artist of aTrack)
         set aName to (get name of aTrack)
         set aAlbum to (get album of aTrack)
         set aFile to (get location of aTrack)
         tell application "Cyberduck"
            change folder to theUploadFolder
            change folder to aArtist
            change folder to aAlbum
            upload item aFile
         end tell
      end repeat
   end if
end tell

-- disconnect from ftp
tell application "Cyberduck"
   disconnect
end tell

dkocher
Cyberduck Team
Posts: 763
Joined: Thu Feb 03, 2005 1:41 pm
Location: Switzerland
Contact:

Re: Questions on Applescript and Cyberduck

Postby dkocher » Thu Sep 17, 2009 8:07 pm

As stated in the release notes AppleScript is currently not supported for the Snow Leopards beta builds.

brandon_r87
Harmless
Posts: 2
Joined: Thu Sep 17, 2009 6:23 am

Re: Questions on Applescript and Cyberduck

Postby brandon_r87 » Thu Sep 17, 2009 8:18 pm

Thanks, my bad for not reading the release notes.


Return to “Cyberduck”

Who is online

Users browsing this forum: Baidu [Spider]