OT: how to modify quacker script

Rick Gaskin rgaskin at wdt.net
Fri Apr 18 12:48:11 CDT 2008


My Yummy FTP has issues. It hasn't failed me since installation and 
lately..all it does is crash after uploading files (long story..jason at 
yummy is working on it)

so, until Yummy is fixed i decided to use CyberDuck

Cyper duck comes with a handy folder action script for uploading files.

The problem is...that everytime it uploads a file it creates a new FTP 
window and doesn't close it.

Yeah yeah this is a scripting 101 issue....and I am guessing, but I 
assume the problem is the line that reads

set theBrowser to (make new browser)

or maybe there needs to be a line that says close window??

entire script below...all i wnat it do to is upload and then close 
window when its done



on adding folder items to this_folder after receiving added_items
    set theServer to "xxx"
    set theUser to "yyy"
    set thePassword to "zzz"
    set theProtocol to "ftp"
    set theUploadFolder to "upload"
   
    set the item_count to the number of items in the added_items
    if the item_count is greater than 0 then
        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 theFile in added_items
                        upload item theFile
                    end repeat
                    disconnect
                end tell
            end tell
        end timeout
    end if
end adding folder items to

-- 
CONFIDENTIALITY NOTICE: This message may be legally privileged and/or confidential and is intended only for the use of the addressee(s). No addressee should forward, print, copy, or otherwise reproduce this message in any manner that would allow it to be viewed by any individual not originally listed as a recipient. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is strictly prohibited. If you have received this communication in error, please immediately notify the sender and delete this message. Thank you.



More information about the Creator mailing list