Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 06 JAN 1999 02:37:07PM Jim Horvath wrote:

Thanks Larry, Aaron, and Victor for your responses to my previous question about replacing the indexing background.

I noticed that once my routine has been called and is waiting for a keystroke, the AREV screen is oblivious to mouse input. What code do I have to insert in the loop to exit on and then process a mouse click? Can you push the mouse click back on a command stack the same way you return a keystroke to @DATA?

loop until done

input x, -1
if x then
  done=1
 @DATA := x
end
  • ??? Detect Mouse click here ????

repeat

TIA

Jim


At 06 JAN 1999 03:34PM amcauley@sprezzatura.com onmouseover=window.status=why not click here to send me email?;return(true)", [url=http://www.sprezzatura.com" onMouseOver=window.status=Why not click here to visit our web site?';return(true)]Sprezzatura Ltd[/url] wrote:

Don't use input x,-1 - use Input.Char

From REVMEDIA Vol 4 Issue 5.

The central system routine for keyboard input has been modified to be

"mouse aware". It now returns additional codes permitting the user to know where the mouse was when a button was clicked, and what status line button has been pressed. Thus there are now five functions of Input.Char,

1 - to handle background processing/@Priority.Int etc.

2 - To return a pressed key.

3 - To provide the mouse position when a button is clicked.

4 - To identify the status line cell that has been clicked on.

5 - To permit clicking on the top screen line to display the menu.

As 1 and 2 have not changed they will not be dealt with here.

Mouse Position

Input.Char now accepts a second additional parameter MousePosFlag. If this is set to true, then if a mouse button is clicked (regardless of which mouse button) a string of length four characters will be returned in the first parameter having the format Char(0) : Char(0) : Char(X) : Char(Y) where X and Y are the ascii values representing the X and Y position of the mouse respectively. Thus if the cursor was at 65, 10, the string returned would be Char(0) : Char(0) : Char(65) : Char(10).

amcauley@sprezzatura.com

Sprezzatura Ltd

World Leaders in all things RevSoft


At 06 JAN 1999 05:10PM Jim Horvath wrote:

Well thanks Andrew, but… it was from another of your posts that I picked the details of writing ReplaceBackground in the first place.

http://www.revelation.com/WebSite/discuss.nsf/7a591c01171830eb8525652b0083c06b/b2649c538dc40314852565f900555215?OpenDocument

and in that post was the caveat to use INPUT X, -1 and not INPUT.CHAR for this particular purpose.

In the meantime, I have discovered (in yet another of your posts) the function MOUSE_SUBS(3, key, xpos, ypos) which allows me to detect a mouse click. The problem is that the call also consumes the click, so that when my function exits, the user has to click the mouse again to actually be recognized. I was hoping there is a way to put back the mouse click similar to the


At 06 JAN 1999 05:21PM Jim Horvath wrote:

Oops, I accidently hit the submit button before I was done.. so back to my question..

Having detected a mouse click using the MOUSE_SUBS functions, is it possible to push the click back into the mouse events queue so that the actual processing of the click is done after exiting my replacebackground function? That is, I am looking for the something analogous to:

INPUT X, -1

IF X THEN DATA:= X

which returns a keystoke to the input buffer.


At 07 JAN 1999 04:21AM amcauley@sprezzatura.com onmouseover=window.status=why not click here to send me email?;return(true)", [url=http://www.sprezzatura.com" onMouseOver=window.status=Why not click here to visit our web site?';return(true)]Sprezzatura Ltd[/url] wrote:

Sorry!

From Vol 3 Issue 7

Mouse_Test

This is the equivalent of INPUT.CHAR for mouse actions. It is used to check whether a mouse motion has been made or if a mouse key/key combination has been pressed. If such an action has been taken then the keystrokes will be returned from the function and, if applicable, in @DATA. Thus if the mouse motion was down and left, the left key press would be returned in @DATA and the down keypress as the result of the function. The order of return appears to be that Button Presses take precedence over Y movements which in turn take precedence over X movements. Those actions with precedence will be

returned from the function (which seems only ever to return 1 keystroke),those remaining, in @DATA.

amcauley@sprezzatura.com

Sprezzatura Ltd

World Leaders in all things RevSoft


At 07 JAN 1999 12:12PM Jim Horvath wrote:

Andrew,

Thank you for your assistance.

Jim

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/7a46743cf7739f3c852566f1006bc4b9.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1