Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Hold Middle Mouse Button 5 seconds to activate screensaver


  • Please log in to reply
3 replies to this topic
JT
  • Guests
  • Last active:
  • Joined: --
How can I say, start the screensaver if the middle mouse button is held for 5 seconds without disabling regular function of the MButton?

Problem is that the middle button doens't funtion normal when this script is run...ex: i can NOT click middle mouse button to scroll with my current code. But, it does activate screensaver if I hold it down for 5 seconds.

How do I retain middle button scrolling as normal, but also activate screensaver if held for 5 seconds?

Here is my code so far:
$*MButton::
Keywait, MButton, T5
If ErrorLevel
   SendMessage, 0x112, 0xF140, 0,, Program Manager
return

thanks!

Z_Gecko
  • Guests
  • Last active:
  • Joined: --
~*MButton::

Keywait, MButton, T5

If ErrorLevel

   SendMessage, 0x112, 0xF140, 0,, Program Manager

return


JT
  • Guests
  • Last active:
  • Joined: --
Aha thanks alot!

Do you know if it's possible to have different actions based upon how long a button is held. So I guess it would be based on Mouse Button Up.

Ex:

MButton held for 5 seconds opens up notepad.exe

MButton held for 10 seconds starts screensaver

MButton held for 30 seconds logs you out


Any ideas how to achieve this?

Thanks!

JT
  • Guests
  • Last active:
  • Joined: --
Or, is there a way to display a menu on screen when a button is held for 10 seconds, then a quick tap cycles through each menu item, and holding the button down for 2 seconds again fires that commnd. The menu will disappear automatically after 10 seconds if the button is not pressed again.

MButton held 10 secods
-Menu Pops Up

Tap MButton
-Cycles through menu options

MButton held 2 seconds
-Fires command (ex: start screensaver or open notepad)

No touch for 10 seconds
-Menu disappears


This would be really cool! A multi-funtional button!