Deprecated: Assigning the return value of new by reference is deprecated in /home/yummyftp/www/www/wiki/inc/parserutils.php on line 159

Deprecated: Assigning the return value of new by reference is deprecated in /home/yummyftp/www/www/wiki/inc/parserutils.php on line 162

Deprecated: Assigning the return value of new by reference is deprecated in /home/yummyftp/www/www/wiki/inc/parserutils.php on line 292

Deprecated: Function split() is deprecated in /home/yummyftp/www/www/wiki/inc/auth.php on line 103

Warning: Cannot modify header information - headers already sent by (output started at /home/yummyftp/www/www/wiki/inc/parserutils.php:159) in /home/yummyftp/www/www/wiki/inc/auth.php on line 191

Deprecated: Function split() is deprecated in /home/yummyftp/www/www/wiki/inc/common.php on line 552

Warning: Cannot modify header information - headers already sent by (output started at /home/yummyftp/www/www/wiki/inc/parserutils.php:159) in /home/yummyftp/www/www/wiki/inc/actions.php on line 246
Table of Contents

AppleScript Scripting

Yummy FTP can be automated to perform repetitive tasks using a set of AppleScript commands, which can be entered into a script file, using the Script Editor application that is installed in your Applications folder (within an AppleScript folder).

The Script Editor application can also be used to record actions that you perform with Yummy FTP, creating a script containing the necessary AppleScript commands to repeat those actions. This function can be especially useful to see how scripting works and to provide a basis for any script that you would like to write.

Once an AppleScript script has been created, it can be attached to an Automator workflow, or it can be saved as a standalone double-clickable script-application, or the script can be attached to any application which supports the attachment of scripts.

Dictionary

Below is the Yummy FTP AppleScript dictionary, listing all the commands that Yummy FTP will accept.

Required Suite

All applications support these commands

open

Open the selected files

Syntax: open string : Full path to a file or folder, or a list of files and folders

Note: This command performs two functions in Yummy FTP:

quit

Exit the application

Syntax: quit

Yummy FTP Suite

These are the commands that Yummy FTP provides to connect with servers, transfer files and perform other file management tasks, including synchronization.

connect

Establish a connection using an existing Bookmark

Syntax: connect string : Bookmark name

Result: 0 = Connection established 1 = Failed to initiate connection 2 = Named Bookmark not found 3 = Connection attempt failed

using connection

Instruct the specified connection to perform a task

Syntax: using connection string command string : Connection name, command, item specifier

Result: 0 = Task completed successfully 1 = Named connection not found 2 = Named connection already busy 3 = Task failed

disconnect

Disconnect and close the connection named Specify the connection name

Syntax: disconnect string : Connection name

Result: 0 = Disconnection successful 1 = Named connection cannot be found 2 = Disconnection failed

URL Suite

These commands have become the standard in all Mac applications that are Internet orientated, and are simplistic ways to upload or download a file or folder, or view a server directory.

UploadURL

Send the specified files/folders to the server and directory described by the url parameter

Syntax " UploadURL string with list : Specify a fully qualified URL that points to a directory

Result: 0 = Successful 1 = Provided URL was faulty 2 = Unable to initiate connection 3 = Unable to resolve provided URL

GetURL

Fetch or display the specified URL

Syntax : GetURL string : Specify a fully qualified URL that points to a file or directory If a file is specified it will be downloaded If a directory is specified it will be displayed

Result: 0 = Successful 1 = Provided URL was faulty 2 = Unable to initiate connection 3 = Unable to resolve provided URL

An Example Script

tell application "Yummy FTP"
	activate
	connect "Bookmark name"
	using connection "Bookmark name" list local folder "/Users/yummyftp/My Downloads"
	using connection "Bookmark name" list remote folder "/www/files/latestsources"
	using connection "Bookmark name" download "*"
	disconnect "Bookmark name"
end tell

In the above example, the following will occur:

Usage Tips

Some operations can be quite lengthy, such as downloading a large file. In this case it is possible for the standard AppleScript command timeout of 2 minutes to be exceeded and the script will fail. In this case, specify a *with timeout* around the script, such as below:

with timeout of 32766 seconds
	using connection "Bookmark name" download "Hugefile.VOB"
end timeout