Page 1 of 1

scripting problems with sync and "verification" sc

Posted: Sun Dec 30, 2007 1:11 am
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

Posted: Wed Jan 16, 2008 9:54 am
by zippy_gerbil
Did you/anyone else find a solution to this?

Re: scripting problems with sync and "verification" sc

Posted: Thu May 01, 2008 12:56 pm
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

Re: scripting problems with sync and "verification" sc

Posted: Thu May 01, 2008 1:07 pm
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