Rawox Posted February 9, 2009 Share Posted February 9, 2009 (edited) Does anyone knows how to do this? I want to make this work: While 1 $msg = GUIGetMsg() Select Case $msg = $dirbutton GuiDelete() Run ( $dirinput ) If @error Then FireFoxUser() Else WinWaitActive ( "Firefox" ) Sleep ( 500 ) WinSetState ( "Firefox", "", @SW_MAXIMIZE ) Sleep ( 500 ) Case $msg = $GUI_EVENT_CLOSE GuiDelete() Send ( "{F4}" ) Exit Case $msg = $quitbutton GuiDelete() Send ( "{F4}" ) Exit EndSelect WEnd GUIDelete() EndFunc Edited February 9, 2009 by Rawox Link to comment Share on other sites More sharing options...
Pain Posted February 9, 2009 Share Posted February 9, 2009 Your code is incomplete but I can see you forgot to close the If. To be able to debug your code look at the console in Scite and post the error. Link to comment Share on other sites More sharing options...
jvanegmond Posted February 9, 2009 Share Posted February 9, 2009 While 1 $msg = GUIGetMsg() Select Case $msg = $dirbutton GuiDelete() Run ( $dirinput ) If @error Then FireFoxUser() Else WinWaitActive ( "Firefox" ) Sleep ( 500 ) WinSetState ( "Firefox", "", @SW_MAXIMIZE ) Sleep ( 500 ) EndIf Case $msg = $GUI_EVENT_CLOSE GuiDelete() Send ( "{F4}" ) Exit Case $msg = $quitbutton GuiDelete() Send ( "{F4}" ) Exit EndSelect WEnd GUIDelete() EndFunc github.com/jvanegmond Link to comment Share on other sites More sharing options...
Rawox Posted February 9, 2009 Author Share Posted February 9, 2009 Your code is incomplete but I can see you forgot to close the If. To be able to debug your code look at the console in Scite and post the error. Thanks I forgot to close it yes... That's one My other Problem is that I have an input box $dirinpunt = GUICtrlCreateInput ( "", 25, 188, 300 ) and I want to run the file that is filled in in the input box, but this doesn't work... Run ( "$dirinpunt" ) So my problem now is... Someone fills in a path (C:\.....\jads.exe ) and I want to run it like in my last code... Anyone? Link to comment Share on other sites More sharing options...
Pain Posted February 9, 2009 Share Posted February 9, 2009 Try GuiCtrlRead($dirinpunt). Link to comment Share on other sites More sharing options...
Rawox Posted February 9, 2009 Author Share Posted February 9, 2009 Oops. I already close the GUI Before I requested it. Stupid me 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