Page 1 of 1

Right Mouse Button disables view

Posted: 02 Nov 2017, 08:07
by Infernal
A very strange thing occurs.
When I execute this piece of code (anywhere)

Code: Select all

Send {RButton Up}
or its alternative version

Code: Select all

Click, Up, Right
my monitors are turning off, and says 'No signal detected', until I move my mouse.

So my computer somehow disables monitors.... when it shouldn't.
How to fix that one?

Re: Right Mouse Button disables view

Posted: 03 Nov 2017, 07:05
by Delta Pythagorean
That doesn't relate to AHK, do make sure that you don't have any other scripts that detects right click and (somehow) shuts off the monitor.

Re: Right Mouse Button disables view

Posted: 01 Feb 2018, 20:20
by Tezzle
I have the exact same issue and it happens ONLY when I use autohotkey, there's no other scripts or anything running and as soon as I turn off autohotkey, it stops...Please help, I'm disabled and i can't do much without autohotkey!

Re: Right Mouse Button disables view

Posted: 02 Feb 2018, 08:34
by Tezz95
I have the exact same issue and it happens ONLY when I use autohotkey, there's no other scripts or anything running and as soon as I turn off autohotkey, it stops...Please help, I'm disabled and i can't do much without autohotkey!

Re: Right Mouse Button disables view

Posted: 02 Feb 2018, 11:51
by nnnik
It could be a driver issue or something related - as nothing similar happens on my PC it is actually very hard to find out what is causing it and how to prevent it.

Re: Right Mouse Button disables view

Posted: 09 Feb 2018, 03:54
by lexikos
And this?

Code: Select all

Send {RButton Down}
Send {RButton Up}

Code: Select all

Click, Down, Right
Click, Up, Right
If this does not trigger the issue, there's a simple explanation -- no, two simple explanations for why it mightn't happen when you use the mouse normally:
  1. You can't physically release the mouse button without first pressing it down.
  2. When you physically click the button, you naturally move the mouse by some small amount (may not apply if you have separate buttons such as on a laptop, trackball or graphics tablet).
Given the rarity of this issue, it is almost definitely going to be related to some other software you have installed; i.e. this other software misbehaves when it detects an unexpected mouse-button-up event with no prior mouse-button-down.

Make sure that you aren't doing something like this:

Code: Select all

F1::
Send {RButton up}
;  <---  forgot the "return"!

#o::  ; Win+O hotkey that turns off the monitor.
Sleep 1000  ; Give user a chance to release keys (in case their release would wake up the monitor again).
; Turn Monitor Off:
SendMessage, 0x112, 0xF170, 2,, Program Manager  ; 0x112 is WM_SYSCOMMAND, 0xF170 is SC_MONITORPOWER.
; Note for the above: Use -1 in place of 2 to turn the monitor on.
; Use 1 in place of 2 to activate the monitor's low-power mode.
return
(The #o example was copy-pasted from the PostMessage documentation.)

Re: Right Mouse Button disables view

Posted: 11 Feb 2018, 00:33
by Exaskryz
For testing, I would close every software you can through the task manager and then running a simple Click, up, right / Send {RButton up} to see if you can replicate the issue then.

AHK may indeed be a factor, but it is likely not the cause but instead a cofactor enabling the root problem.

My hope is that when all optional software are closed, AHK won't be able to cause the monitors to shut off. You may try an alternate windows account, but I often see plenty of programs installed and launched at login for multiple windows accounts in an attempt to diagnose this.

If you can get to a point where that AHK code runs without turning off your monitor, then you can try relaunching certain software and work your way to identifying the one software that is the issue when it is running when AHK executes that command.