Infinitex0 Posted March 20, 2006 Share Posted March 20, 2006 I know that as soon as someone answeras this that I'll see what I'm doing wrong. #include <GUIconstants.au3> GUICreate("Alpha") $alphavariable1 = GUICtrlCreateButton("Alph info", 50, 50) GUISetState(@SW_SHOW) $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $alphavariable1 MsgBox(4096, "alpha info" ,"info:" & FileReadLine("C:\Documents and Settings\Owner\My Documents\alpha1.txt", 1)) EndSelect as soon as I activate the script the gui flashes on for a milisecond then closes. The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center] Link to comment Share on other sites More sharing options...
MHz Posted March 20, 2006 Share Posted March 20, 2006 While 1 WEnd Link to comment Share on other sites More sharing options...
Nuffilein805 Posted March 20, 2006 Share Posted March 20, 2006 While 1 WEndthats what i wanted to answer you just forgot the loop your whole script should look like this #include <GUIconstants.au3> GUICreate("Alpha") $alphavariable1 = GUICtrlCreateButton("Alph info", 50, 50) GUISetState(@SW_SHOW) while 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $alphavariable1 MsgBox(4096, "alpha info" ,"info:" & FileReadLine("C:\Documents and Settings\Owner\My Documents\alpha1.txt", 1)) EndSelect wend my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
Infinitex0 Posted March 20, 2006 Author Share Posted March 20, 2006 Thanks as I said as soon as someone answered this it would be obvious. The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center] Link to comment Share on other sites More sharing options...
MHz Posted March 20, 2006 Share Posted March 20, 2006 (edited) Consider using @MyDocumentsDir in place of your hardcoded string. C:\Documents and Settings\Owner\My Documents Edit: To clarify to what your MsgBox line should look like MsgBox(4096, "alpha info" ,"info:" & FileReadLine(@MyDocumentsDir & "\alpha1.txt", 1)) Edited March 20, 2006 by MHz 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