Noobiee Posted June 30, 2015 Posted June 30, 2015 (edited) 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 June 30, 2015 by Noobiee
MikahS Posted June 30, 2015 Posted June 30, 2015 (edited) GetKeyState is not an AutoIt function. It is from AutoHotkey. Edited June 30, 2015 by MikahS Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy 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
Noobiee Posted June 30, 2015 Author Posted June 30, 2015 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 }?
MikahS Posted June 30, 2015 Posted June 30, 2015 (edited) Yes, have a look at the _IsPressed function. It would be the '02'. Edited June 30, 2015 by MikahS Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy 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
Noobiee Posted June 30, 2015 Author Posted June 30, 2015 (edited) 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 June 30, 2015 by Noobiee
MikahS Posted June 30, 2015 Posted June 30, 2015 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 ~ getENVvarsMy 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now