Jump to content

_IsPressed - Why doesn't it work?!?


Recommended Posts

#include <Misc.au3>
HotKeySet("{ESC}", "Terminate")
Local $dll = DllOpen("user32.dll")

While 1
   Sleep(60000)
WEnd

Func Terminate()
   Exit
EndFunc


Local $i = 0
While 1
   If _IsPressed("01",$dll) Then ; Left MouseClick
      Do
         $i=$i+1
         Send("1")
         Sleep(250)
      Until $i=10
   ElseIf _IsPressed("0D",$dll) Then ; {Enter}
      Do
         $i=$i+1
         Send("2")
         Sleep(250)
      Until $i=10
   EndIf
WEnd

DllClose($dll)

 

Hello together,

I've tried getting this straight for waay too long. I've looked into the AutoIt Help, and the logic should be exactly the same. It should work. But it doesn't. I'm at my wits end...

I'd appreciate help. 

Thanks in advance,

Jhon

 

Link to comment
Share on other sites

#include <Misc.au3>
HotKeySet("{ESC}", "Terminate")
Local $dll = DllOpen("user32.dll")

Local $i = 0
While 1
   If _IsPressed("01",$dll) Then ; Left MouseClick
      Do
         $i=$i+1
         Send("1")
         Sleep(250)
      Until $i=10
   ElseIf _IsPressed("0D",$dll) Then ; {Enter}
      Do
         $i=$i+1
         Send("2")
         Sleep(250)
      Until $i=10
   EndIf
WEnd

DllClose($dll)

Func Terminate()
   Exit
EndFunc

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...