markj Posted March 13, 2006 Posted March 13, 2006 Hi AllI'm a rank amateur/beginner at AutoIT but want to simply create a console for running other executables.I used the gui wizard to create a simple image that has buttons on that link to other exe's but i cannot for the life in me work out how to link the buttons to the executables.I know im thick and this is easy for you lot - but give me a chance and i'll get there in the end.This is the only code i've got for the gui so farGuiCreate("SolveSE Console", 296, 425,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))$Label_1 = GuiCtrlCreateLabel("SolveSE Console: What do you want to do?", 40, 10, 270, 30)$Button_2 = GuiCtrlCreateButton("Stop SolveSE", 10, 70, 270, 40)$Button_3 = GuiCtrlCreateButton("Uninstall SolveSE", 10, 120, 270, 40)$Button_4 = GuiCtrlCreateButton("Install New SolveSE", 10, 170, 270, 40)$Button_5 = GuiCtrlCreateButton("Upgrade SmartSwitch", 10, 220, 270, 40)$Button_6 = GuiCtrlCreateButton("Upgrade SCSrv", 10, 270, 270, 40)$Button_7 = GuiCtrlCreateButton("Exit", 40, 320, 210, 40)$Progress_8 = GuiCtrlCreateProgress(10, 380, 270, 30)While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelectWEndExitAny help with adding the functionality to launch exe's off each of these buttons would be greatly appreciated.ThanksMark
Moderators SmOke_N Posted March 13, 2006 Moderators Posted March 13, 2006 Case $msg = $Button_1 Run('Some.exe') Case $msg = $Button_2 Run('Someother.exe') Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Valuater Posted March 13, 2006 Posted March 13, 2006 (edited) Welcome to the Forums!!maybe#include <GuiConstants.au3> GuiCreate("SolveSE Console", 296, 425,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Label_1 = GuiCtrlCreateLabel("SolveSE Console: What do you want to do?", 40, 10, 270, 30) $Button_2 = GuiCtrlCreateButton("Stop SolveSE", 10, 70, 270, 40) $Button_3 = GuiCtrlCreateButton("Uninstall SolveSE", 10, 120, 270, 40) $Button_4 = GuiCtrlCreateButton("Install New SolveSE", 10, 170, 270, 40) $Button_5 = GuiCtrlCreateButton("Upgrade SmartSwitch", 10, 220, 270, 40) $Button_6 = GuiCtrlCreateButton("Upgrade SCSrv", 10, 270, 270, 40) $Button_7 = GuiCtrlCreateButton("Exit", 40, 320, 210, 40) $Progress_8 = GuiCtrlCreateProgress(10, 380, 270, 30) GUISetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_7 ExitLoop Case $msg = $Button_2 MsgBox(0,"", " button 2 was pressed ") ;;; EndSelect WEnd Exitto learn alot quickly... check this outhttp://www.autoitscript.com/forum/index.php?showtopic=21048#8) Edited March 13, 2006 by Valuater
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