Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wait to Check for Double Click
#1
Question 
Hi there,
I need a macro that will wait to check if my mouse button is clicked twice before skipping a song. Kevin sent me this code a while ago, but I've still been having some issues with it. 

Macro Left Click - Play
Trigger #L //FF_Mouse1     Help - how to add the trigger to the macro
Code:
Copy      Help
wait 0.4 ML; err int singleClick=1
if singleClick=1
,key (VK_MEDIA_PLAY_PAUSE)
This goes along with a 2nd macro, seen here.

Macro Left Click Double - Spotify Volume Mode
Trigger ##L //FF_Mouse1     Help - how to add the trigger to the macro
Code:
Copy      Help
if win("" "AutoHotkey")
,clo win("" "AutoHotkey")
,OsdHide
else
,run "$user profile$\Downloads\Spotify.ahk-master\Example Hotkeys.ahk" "" "" "*" 0x10000
,_monitor=1
,OnScreenDisplay "Spotify Volume Mode" -1 +1 +1 "Calibri" 48 0xFFFFFF 1 "" 1

The 2nd macro has been activating when I try to activate the first one. If I try to press the buttons too quick, both macros will activate. Does anyone have any idea how to improve this? It's not the worst thing ever, but it's getting very annoying.
Thank you  Smile
#2
try to combine them into 1 macro



Trigger #L //FF_Mouse1     Help - how to add the trigger to the macro
Code:
Copy      Help
wait 0.4 ML; err int singleClick=1
if singleClick=1
,key (VK_MEDIA_PLAY_PAUSE)
else
,if win("" "AutoHotkey")
,,clo win("" "AutoHotkey")
,,OsdHide
,else
,,run "$user profile$\Downloads\Spotify.ahk-master\Example Hotkeys.ahk" "" "" "*" 0x10000
,,_monitor=1
,,OnScreenDisplay "Spotify Volume Mode" -1 +1 +1 "Calibri" 48 0xFFFFFF 1 "" 1
#3
I tried exactly that before with no luck but it worked this time... I'm tired of sounding dumb  Tongue eventually everything has to cooperate, right? Thanks so much!

Oh, one more question regarding this actually. Is there a way to eat the second click as well?


Forum Jump:


Users browsing this thread: 1 Guest(s)