Busser Posted November 18, 2009 Share Posted November 18, 2009 Hi im kinda new to this still learning. i need a little help if you guys don't mind. here is my code expandcollapse popup$window = GUICreate("Timed Game Close Down", 400, 100) GUICtrlCreateLabel("Game Window Title Name:", 10, 10) $title = GUICtrlCreateInput("", 222, 10, 175, 18) GUICtrlCreateLabel("Time Before Window Closes in Milliseconds:", 10, 40) $time = GUICtrlCreateInput("", 222, 40, 175, 18) $ok = GUICtrlCreateButton("OK!", 150, 70, 35) $cancel = GUICtrlCreateButton("Cancel", 200, 70, 50) GUISetState(@SW_SHOW) ;------------------------------------------------------------------------------------ HotKeySet("{Home}", "TogglePause") HotKeySet("{End}", "Terminate") Global $WinTitle ='test.txt' ;--------------------------------------------------------------------------------------- WinActivate ( "test.txt" ) If WinExists($WinTitle) Then Sleep(10000) Else MsgBox(0, "No test.txt Window", "Can't find test.txt Window!"&@CRLF&"Launch the game before."&@CRLF&""&@CRLF&"Will Close Now.", "", "") Exit EndIf WinActivate ( "test.txt" ) ToolTip("Game Window Will CLose In 30 Seconds Press End to Stop", 0, 0) Sleep (3000) WinKill ( "test.txt" ) MsgBox(64, "Aion", "Game Window Closed") ;------------------------------------------------------------------------------------- Func TogglePause() $Paused = NOT $Paused While $Paused Sleep(100) ToolTip('Game Close Count Down Paused! (Home = Enable - End = Exit)',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc What i want to do is 1) When something is typed in the Gui window in the "Game Window Title Name:" it will auto change everything that has "test.txt" 2) Everything that is put into "Time Before Window Closes in Milliseconds:" it will auto change only the " Sleep(10000)" but not the other sleep function 3) and if you there anything esle you guys see wrong plz Quote Johnny 5 love input hahahahahha thank you very much for your time Link to comment Share on other sites More sharing options...
Mat Posted November 18, 2009 Share Posted November 18, 2009 Check out this for detecting changes in the inputs: http://www.autoitscript.com/forum/index.php?showtopic=105582 ToolTip("Game Window Will CLose In 30 Seconds Press End to Stop", 0, 0) Sleep (3000)3000 msecs is 3 seconds, not 30 Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
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