attactician Posted April 15, 2008 Share Posted April 15, 2008 Hello, I'm new to Autoit, but ran through the various tutorials and understand the basics of creating a GUI and installing one application, but I would like to create a GUI with the option to select from a series of buttons, or maybe a list of some kind, then install that particular application. I found tons of custom scripts to install single applications, but not multiple. Can anyone point me in the right direction? Link to comment Share on other sites More sharing options...
covaks Posted April 16, 2008 Share Posted April 16, 2008 Take a look Here for an idea. Or here's another simple one: expandcollapse popup#include <GuiConstants.au3> #Include <GuiListBox.au3> $hWnd = GuiCreate("Installer") GuiCtrlCreateLabel("Click to highlight items to install",5,5) $hListBox = GUICtrlCreateList("",5,20,150,100,$LBS_MULTIPLESEL) GUICtrlSetData(-1,"App1|App2|App 3|App4|App 5|App6","") $hButton = GuiCtrlCreateButton("Install",5,120,50) GuiSetState() While 1 $msg = GuiGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop Case $hButton $aSelectedItems = _GUICtrlListBox_GetSelItemsText($hListBox) If IsArray($aSelectedItems) Then For $x = 1 to $aSelectedItems[0] Execute(StringReplace($aSelectedItems[$x]," ","_") & "_Installer()") Next EndIf EndSwitch Sleep(50) WEnd Func App1_Installer() msgbox(0,"","Installing App1") ;installer code here. EndFunc Func App2_Installer() msgbox(0,"","Installing App2") EndFunc Func App_3_Installer() msgbox(0,"","Installing App3") EndFunc Func App4_Installer() msgbox(0,"","Installing App4") EndFunc Func App_5_Installer() msgbox(0,"","Installing App5") EndFunc Func App6_Installer() msgbox(0,"","Installing App6") EndFunc Link to comment Share on other sites More sharing options...
attactician Posted April 16, 2008 Author Share Posted April 16, 2008 Thanks, I'll give that a try! Link to comment Share on other sites More sharing options...
Swift Posted April 16, 2008 Share Posted April 16, 2008 I have also made something like this. Do a forum search for: 'Best programs' without the ' of course. Link to comment Share on other sites More sharing options...
attactician Posted April 17, 2008 Author Share Posted April 17, 2008 I have also made something like this. Do a forum search for: 'Best programs' without the ' of course.Thanks! One question however, I have a mixture of msi and exe programs, and so far every code I try wants to install all of the programs simultaneously, rather than one after another. Do you know if this is an easy problem to fix? What do I need to add to my code so apps install sequentially? Thanks again for your help. 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