Jump to content

GetKeyState Unknown Function Name


Recommended Posts

Hai guys, 

Im new to autoit and i was using GetKeyState to check the mouse key state and i keep getting Unknown Function Name... So what to do?

Also

#include <Misc.au3> (This was actually used when i was using function is pressed)

Sh()
Func Sh()
         While 1

           If GetKeyState ("02") Then
               STUFF
            If Not @error Then
              STUFF
                     EndIf
                     EndIf
     WEnd

   EndFunc   ;==>Sh

 

 

Is this code correct? Will it work or will i get another error ? (Im absolute noobie to autoit)

Edited by Noobiee
Link to comment
Share on other sites

GetKeyState is not an AutoIt function. It is from AutoHotkey.

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

Yes, have a look at the _IsPressed function. It would be the '02'.

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

Yes, have a look at the _IsPressed function. It would be the '02'.

 

Tried it but it isnt working D: !?

 

I want something like , If you HOLD RMB {DO THIS}  , if you are NOT HOLDING RMB {Do Nothing}

 

Sh()
Func Sh()
         While 1

           If _IsPressed ("02") Then
               STUFF
            If Not @error Then
              MouseClick("Left")
                     EndIf
                     EndIf
     WEnd

   EndFunc   ;==>Sh

 

Will this work?

Edited by Noobiee
Link to comment
Share on other sites

Once you make the mouse down event of the right key the _IsPressed will toggle, doing anything that is in the conditional statement. 

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

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