Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

requesting Send() information

$
0
0
AutoIt         
  1. #include <Misc.au3>
  2.  
  3. Global $hDLL = DllOpen("user32.dll")
  4.  
  5. HotKeySet("{SPACE}","RSendHold")
  6. HotKeySet("{F9}", "Terminate")
  7.  
  8. Send("{NUMLOCK off}")
  9.  
  10.  
  11.  While 1
  12.    
  13.     Sleep(10)
  14.  
  15.    
  16. Func Terminate()
  17.       DllClose($hDLL)
  18.  
  19.    Exit
  20.    EndFunc
  21.    
  22.  Func RSendHold()
  23.     HotKeySet("{SPACE}","")
  24.  
  25. For $x=0 to $x=1
  26.                   If _IsPressed("20", $hDLL) Then
  27.                      Send("{SPACE UP}")
  28.                  EndIf
  29.                  
  30.                 If _IsPressed("26", $hDLL) Then
  31.                     Send("{Q down}")
  32.                    Send("{NUMPADADD down}")
  33.                   Send("{UP down}")
  34.                   Send("{Q up}")
  35.                   Send("{NUMPADADD up}")
  36.                   Send("{UP up}")
  37.                Else
  38.                      Send("{SPACE UP}")
  39.              HotKeySet("{SPACE}","RSendHold")
  40.                 ExitLoop
  41.                EndIf
  42.                
  43.         Next       
  44.  
  45.       DllClose($hDLL)
  46.    
  47.    

shouldnt the above script be able to write at least one or couple Q or + characters on my notepad opened and focused when i press spacebar key and then up key ?

 

all i get is spacebar locked until script is ended - terminated and at notepad none of the following: Q ,  +  , when spacebar and up arrow is pressed.

(id apreciate if u post code use simple functions)

 

regards , thanks in advance


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>