Short: Check if mouse buttons are pressed Author: marco@markreds.it (Mark Reds) Uploader: Mark Reds Type: util/batch Architecture: m68k-amigaos This tool checks if at least one button of the given list is pressed and delivers an appropriate return code, which can be processed in shell scripts to trigger any action you like. "MousePressed" doesn't require Intuition and get the mouse state by reading CIA registers. Just copy "MousePressed" into your C: directory or elsewehere in your command path and use it in you scripts as the following example: MousePressed BOTH IF WARN ; Both LEFT and RIGHT buttons is pressed. Execute ; alternate startup-sequence number 2. Execute S:startup-sequence.2 EndCLI >NIL: Quit ENDIF ;... MousePressed LEFT IF WARN ; MousePressed reports that the LEFT button is pressed. ; Execute alternate startup-sequence number 3. Execute S:startup-sequence.3 EndCLI >NIL: Quit ENDIF ;... Usage: MousePressed LEFT|RIGHT|BOTH|MIDDLE LEFT check if LEFT button is pressed RIGHT check if RIGHT button is pressed BOTH check if both LEFT and RIGHT buttons are pressed MIDDLE check if MIDDLE button (if your mouse has one) is pressed "MousePressed" will return the code 5 (RETURN_WARN) if at least one of the specified buttons are pressed, otherwise 0 (RETURN_OK) is returned. "MousePressed" can also detects the MIDDLE button if your non-stardard Amiga mouse is equipped with a third button, also called MIDDLE button.