Scripts can be assigned to a graphic, so that when the user clicks on the graphic the script is run. This is achieved using the graphics macros tgtpos and tgsel with -1 parameters. You must first assign a script to a selected object graphic using the tgtext macro, or by selecting [Graphic/Attach text/Text stream]. Change the position of the text stream using the tgtpos macro shown below:
Run the script by selecting the graphic using the graphics selection macro tgsel as shown below:
If you are planning an interactive document of some kind it would make sense to assign the tgsel -1 macro to a keystroke or toolbar button for instance. Like the example shown below (0000 representing the key number):
|