DonationCoder.com Software > Post New Requests Here
Request: Left-mouse-click triggers a PrtScr press in the background
skwire:
Thanks, mouser. :D The kudos needs to go to Microsoft, however, for providing the window message that makes it easy to do stuff like that.
davidvan:
Skwire, this is awesome! Thank you so much for such a quick turn-around. I will test it tomorrow in my work pc...but given the confirmation from mouser (thanks!), I know it will work for me.
One question: what change can I make to the code to have every mouse click trigger the prtscr without clicking on the titlebar? Is this significantly more difficult to achieve? Thanks!
skwire:
You want every left mouse click, no matter where, to trigger a PrintScreen? If so:
--- Code: AutoIt ---~LButton::{ Send, {PrintScreen} ; Send, !{PrintScreen} ; Sends an alt-printscreen.}Return
davidvan:
Thank you again. This is exactly what I was looking for!
A final question if I may (I promise):
If the mouse click in not on an application window (ie: desktop area, task bar, Start, etc.), can I not trigger the prtscr? In other words, can I trigger only when a click is in an app window (including the title bar and border)?
skwire:
This should do it (under XP, at least):
--- Code: AutoIt ---~LButton::{ CoordMode, Mouse, Screen SetMouseDelay, -1 SetKeyDelay, -1 MouseGetPos, X, Y, hWnd WinGetClass, myClass, % "ahk_id " . hWnd If myClass not in Progman,Shell_TrayWnd { Send, {PrintScreen} }}Return
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version