Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In AutoHotkey, how can I do the following:

While Space and W are pressed down at the same time, send LShift every X milliseconds; do this until Space and W both are released.

I'm a beginner; what I tried, failed...

Any help would be much appreciated!

Edit: I tried:

w & `::
  Loop  {
    If GetKeyState("Space", "P") && GetKeyState("w", "P") {
      Send, {LShift}
      Sleep, 500
      If Not GetKeyState("Space", "P") && GetKeyState("w", "P") {  
        Pause
      }   
  } 
share|improve this question
    
What did you try? –  Darth Android May 17 '13 at 20:42

1 Answer 1

; vk57 & vkC0:: ; w+tilde
Space & vk57:: ; space+w
   Loop
   {
      SendInput, % "{vkA0}" ; lshift
      Sleep, 500
   }
   ; replace "Or" with "And" keywords for to see difference
   Until, !(GetKeyState("Space", "P") Or GetKeyState("vk57", "P"))
   Return
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.