Jump to content
Sign in to follow this  
----

ispressed function not working

Recommended Posts

I'm trying to capture the J key

While 1
      If _IsPressed ("4A") Then
         MsgBox ($MB_OK, "", "")
         While _IsPressed("4A")
         Sleep(10)
        WEnd
     EndIf
   WEnd

So it should pull up a msgbox when I press J but it doesn't

Ive also tried without the quotes on 4A that doesn't work either

While 1
      If _IsPressed (4A) Then
         MsgBox ($MB_OK, "", "")
         While _IsPressed(4A)
         Sleep(10)
        WEnd
     EndIf
   WEnd

I tested this with the A key and it works fine

While 1
      If _IsPressed (41) Then
         MsgBox ($MB_OK, "", "")
         While _IsPressed(41)
         Sleep(10)
        WEnd
     EndIf
   WEnd

 

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