Foxtrot Posted January 8, 2007 Share Posted January 8, 2007 (edited) hey guys, i looked the explanations in 'http://www.autoitscript.com/autoit3/docs/functions/' through, and wasn't able to figure out how to make your GUI call parts of your code by clicking a button :-/ anyone able to help me here? if my problem isn't clear enough, please tell me and ill try to explain better. Thanks, Foxtrot edit: ooh and i only want a single .exe file, nothing else - if possible Edited January 8, 2007 by Foxtrot Link to comment Share on other sites More sharing options...
Foxtrot Posted January 8, 2007 Author Share Posted January 8, 2007 for some reason i can't edit my first post. I just wanted to tell people that i don't want them to do it for me, but just to help me understand i'm here to learn. thanks Link to comment Share on other sites More sharing options...
Uten Posted January 8, 2007 Share Posted January 8, 2007 The parts you want to separate should be done in functions. Then modify the GuiCtrlCreateButton sample in the help file. #include <GUIConstants.au3> Main() Exit Func Main() GUICreate("My GUI Button") ; will create a dialog box that when displayed is centered Opt("GUICoordMode",2) $Button_1 = GUICtrlCreateButton ("Run Notepad", 10, 30, 100) $Button_2 = GUICtrlCreateButton ( "Button Test", 0, -1) GUISetState () ; will display an dialog box with 2 button ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 JobbOne() Case $msg = $Button_2 JobTwo() EndSelect Wend End Func Func JobOne() Msgbox(48, "JobOne","Hello") EndFunc Func JobTwo() Msgbox(48, "JobTwo","Hello") EndFunc Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Foxtrot Posted January 8, 2007 Author Share Posted January 8, 2007 ah yes, thanks alot! that did it for me, could you tell me how to get a button to stop my code as well? The thing is that the thing im starting is looping, so would be nice with a button to stop 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