Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
; 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .