I'll let you guys decide...
Anyway, this is just something I threw together for another member to consider. I usually write these routines from scratch each time I need one, but for fun, I thought I take a shot at one I could save as a library and use as a universal routine for future apps. I need to add some more stuff from my other routines, like my PEEK / POKE routine for detecting Shift + arrow keys, alt, ctrl, etc. I also want to add another variable to let the user decide if the mouse action should take place upon button press or release. I'll probably update this post, occasionally, if and when I make these additions. Fun stuff.
Pete
Edited: Worked in V 1.3, but not the more recent versions. Reason was as bplus pointed out, I had two IF THEN statements following a SELECT CASE statement. Both statements were moved one line up, and now work in the later versions. Thanks for catching that, Mark!
Edited: Added a method and demo for mouse action either on button press or release. The first loop signals a high tone when a mouse click is made with button down. It then shuts off more mouse input until the button is released. Press [ENTER] to exit to the next loop, which issues a low tone when a depressed mouse button is released. Now the user can decide on each mouse event if the program should respond upon mouse button press or release.
Edited: Added my PEEK / POKE routine to detect Shift, Ctrl, Alt, and Ctrl+Shift.
Editd: Added a prevent click initiation on button release if mouse cursor is moved while button is held down. So if the user decides to use the activate mouse command on button release option, this addition allows the user to abort the click, by moving the mouse cursor before the button is released.
Edited: Did some renaming and changed variables to TYPE variables.
Edited: Added mouse row and column indicator.