Script Filter Plug-in
The Script plug-in is displayed when you choose Script in the
Filter Kind pop-up menu in the Nouveau / Éditer Filtre.
This plug-in can be used to create custom filters that use an
AppleScript, shell script, or Perl, PHP, Python, etc script.
The text area just below the Filter Kind pop-up menu is where
you can enter a brief description of the filter. This text is
displayed in the Test Info pane.
- Custom Variables
This table allows adding new variables to the Insert variable
drop-down menu. These variables also appear as fields in the Test Info pane.
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 text to look for, or other custom information needed by the
- 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.
- Always use this result for the status
If this checkbox is on, the result of the script will be used
for the filter status regardless of the status from the service and
any previous filters. If off, the result will be used if "more
interesting" than the old status – i.e. a failure will be used
if previously successful, a change will be used if not a failure or
already changed, and unchanged will only be used if previously
unchanged. This is the normal behavior of the filters, but it can be
useful to override previous filters.
- Insert variable
Variables are markers in the text that are replaced by another
value when a filter, notifier or 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 Filter Variables page for descriptions of the available variables.
- Script 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 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.
Click this button to try out the script. Simon will display a
Aperçu, 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 filter to use real variable
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
- 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
- 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
- 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!
Copyright © Dejal Systems, LLC
Dernière mise à jour le 7 août 2015