ARozanski Posted November 25, 2008 Posted November 25, 2008 Hi, THIS IS NOT A KEYLOGGER!! i have no INTENTION of creating a keylogger! Ok, now that that is out of the way...hehe...I have a game where i want to move run a player to a certain place and register the UP LEFT RIGHT keys and how long i pressed them for so that i can duplicate the player getting the the desired location... 1) How can i do this? How can i register when a key has been RELEASED... 2) If i do do this, will there be any difference between the movements, because i tried to do this in C# and the lag time between the registered keystrokes and the duplicates was too high, but i know that AutoIt (being based on C++) is faster than C#...my question is, so my second question is, how much faster?? Thank you in advance!
November Posted November 25, 2008 Posted November 25, 2008 Hi there, Take a look at _IsPressed command Cheers Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font]
ARozanski Posted November 25, 2008 Author Posted November 25, 2008 Thank you...and how do i check when the key has been released??
November Posted November 25, 2008 Posted November 25, 2008 (edited) Thank you...and how do i check when the key has been released?? Take a look at Opt command (SendKeyDownDelay) yet another example and try to modify to your needs $dll = DllOpen("user32.dll") $count = 0 While 1 Sleep ( 50 ) If _IsPressed("23", $dll) Then $count = $count + 1 ConsoleWrite("End Key Pressed " & $count & " times" & @CRLF) ContinueLoop EndIf WEnd DllClose($dll) Cheers Edited November 25, 2008 by November Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font]
ARozanski Posted November 25, 2008 Author Posted November 25, 2008 (edited) Take a look at Opt command (SendKeyDownDelay) yet another example and try to modify to your needs $dll = DllOpen("user32.dll") $count = 0 While 1 Sleep ( 50 ) If _IsPressed("23", $dll) Then $count = $count + 1 ConsoleWrite("End Key Pressed " & $count & " times" & @CRLF) ContinueLoop EndIf WEnd DllClose($dll) Cheers creating a loop to check if the key is still down isn't good at all...i will get a huge error in the timing. I want it to tell me when the key has been RELEASED Edited November 25, 2008 by ARozanski
dbzfanatic Posted November 25, 2008 Posted November 25, 2008 There is a macro creator for games in the Example Scripts forum. Why not just use that? Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
oMBRa Posted November 25, 2008 Posted November 25, 2008 search in the help file _WinAPI_SetWindowsHookEx
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