R-29: BREXX COMMANDS The Blitz BRexx commands allow you to take control of certain aspects of Intuition. Through BRexx, your programs can 'fool' Intuition into thinking that the mouse has been played with, or the keyboard has been used. This is ideal for giving your programs the ability to perform 'macros' - where one keystroke can set off a chain of pre-defined events. The BRexx commands support tape objects. These are predefined sequences of events which may be played back at any time. The convenient Record command can be used to easily create tapes. Using the MacroKey command, tapes may also be attached to any keystroke to be played back instantly at the push of a button! Please note that none of the BRexx commands are available in Blitz mode. AbsMouse X,Y AbsMouse allows you to position the mouse pointer at an absolute display location. The X parameter specifies how far across the display the pointer is to be positioned, while the Y parameter specifies how far down the display. X must be in the range zero through 639. Y must be in the range zero through 399 for NTSC machines, or zero through 511 for PAL machines. RelMouse X Offset,Y Offset RelMouse allows you to move the mouse pointer a relative distance from it's current location. Positive offset parameters will move the pointer rightwards and downwards, while negative offset parameters will move the pointer leftwards and upwards. MouseButton Button,On|Off MouseButton allows you to alter the status of the Amiga's left or right mouse buttons. Button should be set to zero to alter the left mouse button, or one to alter the right mouse button. On/Off refers to whether the mouse button should be pressed (On) or released (Off). ClickButton Button ClickButton is identical to executing two MouseButton commands - one for pressing the mouse button down, and one for releasing it. This can be used for such things as gadget selection. Type String$ Type causes Intution to behave exactly as if a certain series of keyboard characters had been entered. These are normally sent to the currently active window. Record [Tape#] Record allows you to create a tape object. Tape objects are sequences of mouse and/or keyboard events which may be played back at any time. When a tape# parameter is supplied to the Record command, recording will begin. From that point on, all mouse and keyboard activity will be recorded onto the specified tape. The Record command with no parameters will cause any recording to finish. PlayBack [Tape#] PlayBack begins playback of a previously created tape object. When a Tape# parameter is supplied, playback of the specified tape will commence. If no parameter is supplied, any tape which may be in the process of being played back will finish. Quickplay On|Off QuickPlay will alter the way tapes are played using the PlayBack command. If QuickPlay is enabled by use of an On parameter, then all PlayBack commands will cause tapes to be played with no delays between actions. This means any pauses which may be present in a tape (for instance, delays between mouse movements) will be ignored when it is played back. QuickPlay Off will return PlayBack to it's default mode of including all tape pauses. This is sometimes necessary when playing back tapes which must at some point wait for disk access to finish before continuing. PlayWait PlayWait may be used to halt program flow until a PlayBack of a tape has finished. XStatus XStatus returns a value depending upon the current state of the BRexx system. Possible return values and their meanings are as follows: 0 BRexx is currently inactive. No tapes are either being recorded or played back. 1 BRexx is currently in the process of recording a tape. This may be due to either the Record or TapeTrap commands. 2 BRexx is currently playing a tape back. SaveTape Tape#,Filename$ SaveTape allows you to save a previously created tape object out to disk. This tape may later be reloaded using LoadTape. LoadTape Tape#,Filename$ LoadTape allows you to load a tape object previously saved with SaveTape for use with the PlayBack command. TapeTrap [Tape#] TapeTrap allows you to record a sequence of AbsMouse, RelMouse, MouseButton and ClickButton events to a tape object. TapeTrap works similarly to Record, in that both commands are used to create a tape. However, whereas Record receives information from the actual mouse and keyboard, TapeTrap receives information from any AbsMouse, RelMouse, MouseButton and ClickButton commands which may be executed. TapeTrap with no parameter will finish tape creation. QuietTrap On|Off QuietTrap determines the way in which any TapeTrapping will be executed. QuietTrap On will cause any AbsMouse, RelMouse, MouseButton and ClickButton commands to be recorded to tape, but not to actually have any effect on the porgram currently running. QuietTrap Off will cause any AbsMouse, RelMouse, MouseButton and ClickButton commands to be recorded to tape, AND to cause their usual effects. QuietTrap Off is the default mode. MacroKey Tape#,Rawkey,Qualifier MacroKey causes a previously defined tape object to be attached to a particular keyboard key. RawKey and Qualifier define the key the tape should be attached to. FreeMacroKey Rawkey, Qualifier FreeMacroKey causes a previously defined macro key to be removed so that a BRexx tape is no longer attatched to it.