Galdorf Posted October 25, 2009 Posted October 25, 2009 How do i simulate holding down numpad4 and right cursor key -> forever in a loop? also read an area of of memory for specific values?
herewasplato Posted October 25, 2009 Posted October 25, 2009 How do i simulate holding down numpad4 and right cursor key ~~~Look here:http://www.autoitscript.com/autoit3/docs/functions/Send.htmPost whatever code you come up with after reading that page and then people can help you with the loop and maybe the memory part of your quest. [size="1"][font="Arial"].[u].[/u][/font][/size]
Galdorf Posted October 25, 2009 Author Posted October 25, 2009 (edited) $i = 0 Global $Paused HotKeySet("`", "TogglePause") HotKeySet("{DEL}", "Terminate") Sleep (2000) While $i <= 2 Send ("{RIGHT down NUMPAD4 down}") Sleep (500) $i = $i + 1 WEnd Func TogglePause( ) $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate( ) Exit 0 EndFunc not sure if this is right does not seem to work? need to simulate holding both keys down at same time forever. Edited October 25, 2009 by Galdorf
herewasplato Posted October 25, 2009 Posted October 25, 2009 This looks like it is for a game. Be aware that some games block automation - so this may not work.Global $Paused HotKeySet("`", "TogglePause") HotKeySet("{DEL}", "Terminate") While 1 Send("{RIGHT down}") Send("{NUMPAD4 down}") Sleep(500) WEnd Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func Terminate() Exit 0 EndFunc ;==>Terminate Func OnAutoItExit() Send("{RIGHT up}") Send("{NUMPAD4 up}") EndFunc [size="1"][font="Arial"].[u].[/u][/font][/size]
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