Jump to content
Sign in to follow this  
Noobiee

GetKeyState Unknown Function Name

Recommended Posts

Noobiee

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

Share this post


Link to post
Share on other sites
mikell

Don't you confuse with _IsPressed()  ?

Share this post


Link to post
Share on other sites
MikahS

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

 

Share this post


Link to post
Share on other sites
Noobiee

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

Is there anyway to make something that ;

 

Check if RMB is pressed { DO STUFF } If RMB released { DONT DO STUFF }

?

Share this post


Link to post
Share on other sites
MikahS

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

 

Share this post


Link to post
Share on other sites
Noobiee

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

Share this post


Link to post
Share on other sites
MikahS

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

 

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  

×