Your best friend for file transfer.

Auto Quit (6 posts)
- Started 15 years ago by jehrler
- Latest reply 15 years ago from Jim Matthews
-
jehrler Member
-
Jim Matthews Administrator
Thanks for that suggestion. If you like you can make your own droplet that will quit Fetch after uploading. For a starting point, download the Fetch Example Scripts from http://fetchsoftworks.com/downloads.html and take a look at the DropUpload example. You could add a "quit" command to have it quit Fetch after uploading.
Please let me know if that does not work for you.
Thanks,
Jim Matthews
Fetch Softworks -
jehrler Member
I tried to do it by inserting an sftp address into the sample script and am getting an error.
'Can't get class cFHD"
Here is the script:
property gDesturl : ""
on specify_destination()
set default_url to "<sftp://jehrler:@123.123.123.123:1234/Documents/Program%20Storage/>"set dialog_reply to display dialog "Enter the destination URL for uploads in this format:" & return & return & " <ftp://user:@host/path/>" & return & return & "[Use the Copy URL command in Fetch to copy the current URL]" default answer default_url
if button returned of dialog_reply = "OK" then
set gDesturl to text returned of dialog_reply
end if
end specify_destinationon open doc
if gDesturl = "" then
specify_destination()
end if
if gDesturl ≠ "" then
with timeout of 60000 seconds
tell application "Fetch"
put into «class cFHD» gDesturl item doc
quit
end tell
end timeout
end if
end openspecify_destination()
[This message has been edited by jehrler (edited 11-20-2007).]
-
Jim Matthews Administrator
I would make sure that Fetch is running when you launch Script Editor, so Script Editor can find Fetch's scripting dictionary. If you still see the error, replace the «class cFHD» with url, i.e.:
put into url gDesturl item doc
Thanks,
Jim Matthews
Fetch Softworks -
jehrler Member
Keeping Fetch open didn't seem to help so...
I just went with a simple script adding your last hint and it works great.
Thanks.
on open doc
tell application "Fetch"
put into url "sftp://jehrler:@123.123.123.123:1234/Documents/Program%20Storage/" item doc
quit
end tell
end open[This message has been edited by jehrler (edited 11-20-2007).]
-
Jim Matthews Administrator
I'm glad that worked -- thanks for posting the script.
Jim Matthews
Fetch Softworks
- Page 1
It would be nice if there was an option, at least when using a droplet, to have Fetch quit after the upload is complete.
Posted 15 years ago #