Assault Posted April 29, 2007 Share Posted April 29, 2007 I want the script to start after a button on the gui is pressed, I'm using this : While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE exit Case $nmsg = $Button1 call("main") Case $nmsg = $Button2 Exit EndSwitch WEnd but it starts the script before the button is pressed. Link to comment Share on other sites More sharing options...
Zedna Posted April 29, 2007 Share Posted April 29, 2007 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE exit Case $Button1 call("main") Case $Button2 Exit EndSwitch WEnd Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
eltorro Posted May 2, 2007 Share Posted May 2, 2007 While 1 $nMsg = GUIGetMsg() Select $nMsg Case $nMsg = $GUI_EVENT_CLOSE exit Case $nMsg = $Button1 main() Case $nMsg = $Button2 Exit EndSelect WEnd Func main() Msgbox(266288,"No Title","$Button1 pressed") EndFunc Eltorro Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code 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