Simon User Guide

New/Edit Service > Service Kind > Script Plug-in

This is the Script plug-in. This is displayed when you choose Script in the Service Kind pop-up menu in the New / Edit Service window.

This plug-in is used by the default FTP Directory Listing, Samba SMB, Screenshots, and other services. It will run an AppleScript, shell script, or Perl, PHP, Python, etc script. [Tell me more....]

Description: The text area just below the Service Kind pop-up menu is where you can enter a brief description of the service. This text is displayed in the New / Edit Test window.

Custom Variables: This table allows adding new variables to the Insert variable drop-down menu. These variables also appear as fields in the New / Edit Test window. Click the + button to add a line to the table, or the - button to remove the selected line. You'd typically use this to ask for the server to connect to, or other custom information needed by the script. Note that there is no need to ask for a username and password, as those are always available in the Security section of the New / Edit Test window. [Tell me more....]

Custom Error Descriptions: This table serves two purposes. Firstly, you can edit the Result column value for the Success line to indicate which result number means the script executed successfully - it is normally zero, but you can change it to something else if appropriate. Secondly, you can give more meaningful descriptions to the error result values; these will appear in the Failures table. Click the + button to add a line to the table, or the - button to remove the selected line. [Tell me more....]

Insert variable: Variables are markers in the text that are replaced by another value when the service is used. Use this menu to choose from the available variables. When one is chosen, it is inserted at the insertion point, or replaces the selected text. Refer to the Variables page for descriptions of the available variables. [Tell me more....]

Script typeScript type: Choose the type of script in this combo box. You can type the name, or click the menu on the right-hand side to display the available options. It displays the name of the tool, and its path. You can also specify a tool not listed by typing its path, but if you might want to use it again, you can add it to the default list via the Script Preferences.

Script editor: Write your script here. You can insert variables like those shown between braces. See the Insert variable item above, or expert users can type them directly. You can change the font, size, and colors of this text area in the Script Preferences.

Run Click this button to try out the script. Simon will display a Preview window, displaying the source at the top and the output at the bottom, along with the result. Note that default values will be used for the variables; add a test for this service to use real variable values.

Build This button is only available when the Script type is AppleScript. It builds the script, and displays any AppleScript errors. If valid, the script is colored as conventional for AppleScripts.

Get More: Click this button to visit the Simon Extras page in your web browser. It is the repository for new and user-submitted scripts and more.

Open Script...: Click to load a new script off disk, replacing any already in the window. It could be a standard .scpt, .sh, etc file, or one saved from Simon.

Save Script As...: Click to save the current script, along with the instructions, custom variables, etc to a normal script file. Use this to share your scripts with other Simon users!

Return to the Service Kind page
Return to the New / Edit Service window page
Go to the User Guide Contents
Return to the main Simon page