Hi, guys.
I made a main form and and some other forms, these ones always as modals.
My intention is setup a timer on Main form and, at random times, show a little modal form to the user , asking for some typing.
But I would like to not disturb the user if he/she is typing or moving the mouse.
Could I check this from the main form and not initiate the messaqe question form if the user is occupied?
Thanks for any ideas.
Send message question without diturbing the user
- BruceSteers
- Posts: 1578
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: Send message question without diturbing the user
probably easiest way is to use xprintidle but it won't work on wayland.
The gambas way..?? I do not know about Keyboard but it should be easy to test for Mouse movement...
Shell "xprintidle" To sResult
If Val(RTrim(sResult)) > 3000 then
Print "idle more than 3 seconds"
Endif
The gambas way..?? I do not know about Keyboard but it should be easy to test for Mouse movement...
Dim MouseX As Integer = Mouse.ScreenX, MouseY As Integer = Mouse.ScreenY ' Note Mouse Pos
Wait 1 ' wait one second
If MouseX <> Mouse.ScreenX Or If MouseY<> Mouse.ScreenY Then ' See if mouse has moved
Print "Mouse has moved"
Endif
If at first you don't succeed , try doing something differently.
BruceS
BruceS
- cogier
- Site Admin
- Posts: 1127
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Send message question without diturbing the user
Well, here is my effort regarding this one, I hope it helps. This has not been tested on Wayland.
Re: Send message question without diturbing the user
Thank you.
I will test the ideas. Wayland is really a concern, as I don't know if the users will be using it;
I will test the ideas. Wayland is really a concern, as I don't know if the users will be using it;