scripting problems with sync and "verification" sc

The Cyberduck forums have moved to Google Groups, this forum is read only.
Locked
steeldtailer
Harmless
Posts: 2
Joined: Sat Dec 29, 2007 11:49 pm

scripting problems with sync and "verification" sc

Post by steeldtailer »

Hello,
I'm a bit "green" when it comes to Applescript and was hoping someone here could help me out. I've written a script that will sync external drives with FTP sites that seems to be successful ... with one hiccup ... How do I bypass the verification screen in Cyberduck that makes me click the "Continue" button before it completes the synching process? I am trying to make this an automatic process ... my next hurdle will be invoking the script based on a time of day. Below is my script.

tell application "Cyberduck"
set theServer to "someplace"
set theUser to "myname"
set thePassword to "mypassword"
set theProtocol to "ftp"
set theRemoteFolder1 to "/~/FTP/Private/"
set theLocalFolder1 to "/~/Documents/Personal"
set theRemoteFOlder2 to "/~/FTP/Public/"
set theLocalFolder2 to "/~/Documents/Work"
set theBrowser to (make new browser)
with timeout of 300 seconds
tell (theBrowser)
set the encoding to "UTF-8"
set show hidden to false
connect to theServer with protocol theProtocol with password thePassword as user theUser
sync folder theRemoteFolder1 with local folder theLocalFolder1
sync folder theRemoteFOlder2 with local folder theLocalFolder2
disconnect
end tell
end timeout
end tell
zippy_gerbil
Harmless
Posts: 2
Joined: Wed Jan 16, 2008 9:53 am

Post by zippy_gerbil »

Did you/anyone else find a solution to this?
pixelcrash
Harmless
Posts: 1
Joined: Thu May 01, 2008 12:52 pm

Re: scripting problems with sync and "verification" sc

Post by pixelcrash »

I have the same problem - I need to sync a ftp folder with a local folder via Applescript - the mac is calling the applescript with a schedule - so no one is sitting there - pressing the button - how can i now continue - i tried it with keystroke return - unfortunatly i need to set the focus somehow to the dialogbox before executing the keystroke - but how?

thanks
zippy_gerbil
Harmless
Posts: 2
Joined: Wed Jan 16, 2008 9:53 am

Re: scripting problems with sync and "verification" sc

Post by zippy_gerbil »

If it's just the enter keystroke you need, I got there eventually after a lot of digging - hope it helps! :smile:

The relevant part is from 'delay 5' onwards. The delay 5 part is just to make sure the dialogue box has appeared (it was quite a sluggish machine)

Code: Select all

tell application "Cyberduck"
      set theServer to "ftp.domain.com"
      set theUser to "user"
      set thePassword to "password"
      set theProtocol to "ftp"
      set theRemoteFolder1 to "./"
      set theLocalFolder1 to "/Users/mac6/SDCLClientShare" 
      set theBrowser to (make new browser)
      with timeout of 300 seconds
            tell (theBrowser)
                  set the encoding to "UTF-8"
                  set show hidden to false
                  connect to theServer with protocol theProtocol with password thePassword as user theUser
                  sync folder theRemoteFolder1 with local folder theLocalFolder1
                  
                  delay 5
                  tell application "System Events"
                        tell application "Cyberduck" to activate
                        key code 36 
                  end tell
            end tell
            disconnect
            
      end timeout
end tell
Locked