Hey,
I’m trying to script Cyberduck to upload a file to a specific folder.
I’m modifying this script:
http://bbs.applescript.net/viewtopic.php?id=23537
But instead of having this as a folder action, I’m going to tie this either to an automator action or Butler, and have the script upload the files that are currently selected in the finder”but I keep on getting the “can’t make xxx into right class” error.
Here’s my script; suggestions?
tell application "Finder"
set ItemList to selection
end tell
set theServer to "[url=ftp://ftp.xxxxxxxx.com]ftp.xxxxxxxx.com[/url]"
set theUser to "xxxxxxxx"
set theProtocol to "ftp"
set theUploadFolder to "client"
with timeout of 300 seconds
tell application "Cyberduck"
set theBrowser to (make new browser)
tell (theBrowser)
set encoding to "UTF-8"
connect to theServer with protocol theProtocol as user theUser with initial folder theUploadFolder
repeat with thisItem in ItemList
upload item thisItem
end repeat
end tell
end tell
end timeout