Jump to content
Sign in to follow this  
Jhon_

_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

 

Share this post


Link to post
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

 

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...