Scripts Menu

The scripts menu is a handy place to hold commonly used applescripts but it is also a gateway into perl and shell scripting. Considera ships with several example scripts and you can easily add your own by simply dragging them into the scripts folder. The rest of this page includes a bit of information to help you make your own scripts.

Applescripts - Applescripts must be saved using the ".scpt" file extension if they are going to be used in the scripts menu. Considera sends no information to an applescript, but details and information can be received using Considera's scripting suite. More information on the suite is available on the applescript page.

Perl scripts - Perl scripts saved to the Scripts folder must have the file extension ".pl". The information sent to a perl script depends on what is selected in Considera. If you have selected text in the main text view, then the selected text is passed to the script. If no text is selected then all of the text in the main text field is sent. When writing a perl script, you can easily get this text by referencing $ARGV[0]. For more information on perl scripting, open Terminal (in /Applications/Utilities/) and type man perl.

Shell scripts - In order for shell scripts to appear in the scripts menu, you must have ".sh" as the file extension. Like perl scripts, the scripts are sent the currently selected text or all of the text if there is no selection. Scripts are run using the bash ("sh") shell. You can receive the text being sent by Consider by using $1 in your scripts. For more information, type man sh in Terminal. Tip: use printf instead of echo in your script. echo removes character returns and effectively removes paragraph structure from your document.