Jump to content


Photo

Hotkeys block each other (can't use 2 simultaneously)


  • Please log in to reply
1 reply to this topic

#1 iDrug

iDrug
  • Members
  • 282 posts

Posted 31 May 2012 - 11:27 PM

#w::
while(getkeystate("lwin", "P") && getkeystate("w", "P")){
WinGetPos,,,,Height, A
WinMove,A,,,,,% Height-(A_ScreenHeight/20)
}
Return
#s::
while(getkeystate("lwin", "P") && getkeystate("s", "P")){
WinGetPos,,,,Height, A
WinMove,A,,,,,% Height+(A_ScreenHeight/20)
}
Return
#a::
while(getkeystate("lwin", "P") && getkeystate("a", "P")){
WinGetPos,,,Width,, A
WinMove,A,,,,% Width-(A_ScreenWidth/20),
}
Return
#d::
while(getkeystate("lwin", "P") && getkeystate("d", "P")){
WinGetPos,,,Width,, A
WinMove,A,,,,% Width+(A_ScreenWidth/20),
}
Return

Try to hit Win+D+A and only the script that has hotkey Win+A will work out.
How in that case to make hotkeys Win+D and Win+A work together (simultaneously)?

#2 LazyMan

LazyMan
  • Members
  • 450 posts

Posted 01 June 2012 - 01:20 AM

You can't get true simultaneous actions. But your hotkeys work nicely in sequence without releasing the Windows key. :)