Page 1 of 1

need help with my code

Posted: 15 Jul 2018, 15:41
by anas
hello, i need a little help with my code

Code: Select all

CapsLock::
loop
{
      while GetKeyState("LShift","P"){
	 Pause 
			}
	
      send, {b DOWN}
      sleep, 50
      send, {b UP}
  
}
return



Basically i want an infinite loop to keep "b" pressed, but when i HOLD (not press) LShift the loop will PAUSE (not break).


So "b" is repeating in the loop -> hold LShift -> the loop pause -> Unhold LShift -> the loop work again


any ideas ? thanks

Re: need help with my code

Posted: 17 Jul 2018, 07:00
by Qysh

Code: Select all

CapsLock::
loop
{
      while GetKeyState("LShift","P"){
	 Sleep, 50
			}
	
      send, {b DOWN}
      sleep, 50
      send, {b UP}
  
}
return