dgarrett8 Posted June 23, 2008 Posted June 23, 2008 Ok, so, what I plan on doing it something extremely easy...but I'm having the most difficult time doing this. I just want to press the button R and make it basically substitute for 'D'. I have this basketball game for my computer and the shoot button is 'D' right? The R button is unused fyi. 'R' would be replacing 'D' but would be delayed .4 seconds. (I wonder if this makes any sense to you) I understand autoit a bit. But this is just stumping me. Shouldn't this take me like 5-10 minutes to make? Maybe even less... "I think, therefore I am"[size="1"]René Descartes[/size]
Valuater Posted June 23, 2008 Posted June 23, 2008 I just fixed-up the demo at the bottom of the HotKeySet() help page ; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("r", "ShowMe") ;;;; Body of program would go here ;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMe() Send("D") EndFunc 8)
dgarrett8 Posted June 23, 2008 Author Posted June 23, 2008 I just fixed-up the demo at the bottom of the HotKeySet() help page ; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("r", "ShowMe") ;;;; Body of program would go here ;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMe() Send("D") EndFunc 8) ty . wouldn't i do Sleep(400) after the Send("D") for the shot to take longer? also, i would be able to press r as many times as i want to send D, correct? thank you for replying so quickly "I think, therefore I am"[size="1"]René Descartes[/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