mistrust Posted April 29, 2009 Posted April 29, 2009 I am fairly new to using Autoit but have been learning to write some simple scripts. I am having problems with this scritp and wonder if somebody might help me out.I have been using this script for a game that I play. I would like to add alt+tab to the script so that I can: 1st) run script once 2nd) alt tab to a second window 3) run the same script again 4) alt tab back to the first window and continue to repeat.This is what I have so far... Global $PausedHotKeySet("`", "TogglePause")HotKeySet("{DEL}", "Terminate")$a = InputBox( "Question", "Delay between clicks?", "11250" )WinWaitActive( "Darkfall Online" )Sleep( 2000 )While 1MouseClick( "Left" )Sleep( $a )WEndFunc TogglePause( )$Paused = NOT $PausedWhile $Pausedsleep(100)ToolTip('Script is "Paused"',0,0)WEndToolTip("")EndFuncFunc Terminate( )Exit 0EndFunc
Valuater Posted April 29, 2009 Posted April 29, 2009 Global $Paused HotKeySet("`", "TogglePause") HotKeySet("{DEL}", "Terminate") HotKeySet("{F9}", "Switcher") $a = InputBox("Question", "Delay between clicks?", "11250") WinWaitActive("Darkfall Online") Sleep(2000) While 1 MouseClick("Left") Sleep($a) WEnd Func Switcher() Send("!{TAB}") EndFunc 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 8)
mistrust Posted April 30, 2009 Author Posted April 30, 2009 Thank you very much for your reply Valuater. I tried this and it does nto seem to work. My hope is for the script to switch to the second window every 3 seconds (roughly) run again then switch back to the first window and run again. Then continue to repeate. I tried to use your script and it does not seem to switch back and forth between the windows.
mistrust Posted May 1, 2009 Author Posted May 1, 2009 /bump I am still working on this script and looking for ideas please.
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