bregovic Posted January 4, 2006 Share Posted January 4, 2006 Hi, I'am a newbie with autoit an have the following question: how ban I start an application with button in the GUI? Best regards Brego Link to comment Share on other sites More sharing options...
jefhal Posted January 4, 2006 Share Posted January 4, 2006 how can I start an application with button in the GUI? BregoHi Brego-I would first look in the AutoIT help file, which is full of useful examples. Check out guicreate and guictrlcreatebutton for starters.Also, search this forum for those same functions and see what other people have done.Then, write some test code and post it here. You will get lots of feedback at that point.... ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
bregovic Posted January 4, 2006 Author Share Posted January 4, 2006 Hi Brego-I would first look in the AutoIT help file, which is full of useful examples. Check out guicreate and guictrlcreatebutton for starters.Also, search this forum for those same functions and see what other people have done.Then, write some test code and post it here. You will get lots of feedback at that point.... Hi jefhali have read the helpfile, before I have written here - of course. I found any examples to make events with a button click. But I'm unsure how I can start an application (I haven't found examples - sorry) with a button click, therefore I wrote here.best regardsBrego Link to comment Share on other sites More sharing options...
locutus243 Posted January 4, 2006 Share Posted January 4, 2006 Hi jefhal i have read the helpfile, before I have written here - of course. I found any examples to make events with a button click. But I'm unsure how I can start an application (I haven't found examples - sorry) with a button click, therefore I wrote here. best regards Brego Hey Jefhal, If you know how to make events with a button click then starting an application is easy. Use the Run Function to run your application. (I'm also just a learner with the Gui's so hope I haven't led you astray). I've included some code that should work ok!! #include <GuiConstants.au3> ; GUI GuiCreate("Sample GUI", 400, 400) GuiSetIcon(@SystemDir & "\mspaint.exe", 0) ; BUTTON $button = GuiCtrlCreateButton("Sample Button", 10, 330, 100, 30) While 1 $msg = GUIGetMsg() Select Case $msg = $button Run(@ProgramFilesDir & "\Microsoft Office\office\excel.exe") EndSelect WEnd ; GUI MESSAGE LOOP GuiSetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE Exit WEnd 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