What are Scripts

Scripts automate repetitive tasks and provide additional features that are not available in PageStream. They allow you to customize PageStream to meet your needs.

PageStream offers two types of scripts. Internal scripts can contain only commands so they can only set options. These scripts execute very quickly. You can use them even if you don't know how to use a scripting language because they can be created by recording your actions. External scripts rely on the scripting language of your computer, and may require the installation of a scripting interpreter to execute. Windows, OS X and Linux use Python. MacOS9 computers use AppleScript, while AmigaOS computers use ARexx. External scripts can be more powerful, because they can get information from PageStream as well as set options, but they are also slower to execute.

Instructions on how to write scripts are beyond the scope of this help guide. Complete documentation on all PageStream and BME commands and queries is provided in the PageStream and BME Scripting help files. Instructions for using internal scripts are provided below.

To play an external script: Choose Play External Script from the Script menu. Select a script from the Play file selector. Click Play. If the Play External Script menu item is disabled, this indicates that no applicable scripting interpreter is installed.

To record an internal script: Display the Script Palette and click its Record button, or choose Record from its pop-up menu. Perform the actions you want to record and then click the Stop button or choose Stop from the Script Palette's pop-up menu. You can then edit the script, display it in the Scripts menu, or assign it to an available function key with the Edit Script dialog box.

To play an internal script: Select the script from the Scripts menu or press its associated function key. Alternatively, you can select it from the Script Palette and click the Play button.

To edit an internal script: Select the script from the Script Palette and choose Edit from the pop-up menu. Alternatively, hold down Shift while selecting the script from the Scripts menu or Script Palette.

To save your scripts: Choose Save from the Script Palette's pop-up menu to save your script setup as the default. You can save your scripts to other files, and even export them as the basis for Python, AppleScript or ARexx scripts.

To export your scripts: Select the script from the Script Palette and choose Export from the pop-up menu. The file selector will appear. Enter the name to save the internal script to. If the entered filename ends in .py or .python, a Python script will be exported. If the entered filename ends in .rx, .rexx, or .arexx, an ARexx script will be exported. Any other filenames will result in a Python script on Windows and Linux, Arexx on the Amiga, and AppleScript in MacOS.

NoteMacOS Users: By default, MacOS will take control of a number of the function keys, including the F10 which is the default key for the Redraw Window script. You can change the function key assigned to that script, or turn off the Mac OS hot keys. To make full use of all of the function keys inside PageStream, Go to the "Keyboard" control panel. Click on the "Function Keys" button at the bottom of the dialog box. Make sure that the "Hot Function Keys" selection at the top of the new requestor is not checked (the default is checked) and close both requestors. The function keys should now be freed from OS control. PageStream (and all your other programs) can now take control.

 

What are Scripts  Section  url:PGSuser/scripts
  created:2006-03-10 16:50:16   last updated:2009-05-06 12:16:24
  Copyright © 1985-2017 GrasshopperLLC. All Rights Reserved.

User Contributed Comments For What are Scripts
There are no user contributed comments for this page.

Related Tips
To force a screen redraw, choose Redraw Window from the Scripts menu or press the assigned keyboard shortcut as shown to the right of the Redraw Window menu item.