Jump to content

Recommended Posts

Posted (edited)

Guys, I'm working on a GUI and I really need your help. What I'm trying to do is come up with an interface that will auto install certain applications depending on what group you belong to. For instance, if you are in group 1, you'll select the group, hit the next button and it will check the applications that will be installed. Once the appropriate applications are selected, you hit install and it will install all the applications selected. I've got a rough draft, but I need to insert a back button after you go to the next screen in case you selected the wrong group. I also would like to know, how to set it up to run the app based on what is checked. Anyway, here's what I have:

#include <GuiConstants.au3>

$PCselectGUI = GUICreate("Automated Software Installation", 355, 570, -1, -1)
GuiSetIcon("c:\scripts\logos\install.ico",0)
;GUISetBkColor(0x00E0FFFF)
GUISetFont(9, 300)

$font="Times New Roman"

$tab=GUICtrlCreateTab (2,5, 350,525)

$tab1=GUICtrlCreateTabitem ("Tab1")
   GUICtrlSetState(-1,$GUI_SHOW) ; will be display first
   $Pic1 = GUICtrlCreatePic("C:\scripts\logos\PIC.bmp", 225, 70, 108, 100, BitOR($SS_NOTIFY,$WS_GROUP))
   $tab0ok1=GUICtrlCreateButton ("Next", 278,535,74,23)
        GUISetFont (12, 700, 1, $font)
        GUICtrlCreateGroup ("Software Installation Groups", 10, 50, 335, 470)
;GUICtrlCreateLabel ("Software Installation Groups", 10,50,200,20)
        GUICtrlSetColor(-1,0x052C65)  ; Dark Blue
        GUISetFont(9, 300)
            $1a = GuiCtrlCreateRadio("Group 1", 15, 80, 200)
            GuiCtrlSetState(-1, $GUI_CHECKED)
            $2a = GuiCtrlCreateRadio("Group 2", 15, 105, 200)
            $3a = GuiCtrlCreateRadio("Group 3", 15, 130, 200)
            $4a = GuiCtrlCreateRadio("Group 4", 15, 155, 200)
            $5a = GuiCtrlCreateRadio("Group 5", 15, 180, 200)
            $6a = GuiCtrlCreateRadio("Group 6", 15, 205, 200)
            $7a = GuiCtrlCreateRadio("Group 7", 15, 230, 200)
            $8a = GuiCtrlCreateRadio("Group 8", 15, 255, 200)
            $9a = GuiCtrlCreateRadio("Group 9", 15, 280, 200)
            $10a = GuiCtrlCreateRadio("Group 10", 15, 305, 200)
            $11a = GuiCtrlCreateRadio("Group 11", 15, 330, 200)
            $12a = GuiCtrlCreateRadio("Group 12", 15, 355, 200)
            $13a = GuiCtrlCreateRadio("Group 13", 15, 380, 200)
            $14a = GuiCtrlCreateRadio("Group 14", 15, 405, 200)
            $15a = GuiCtrlCreateRadio("Group 15", 15, 430, 200)
            $16a = GuiCtrlCreateRadio("Group 16", 15, 455, 200)
            $17a = GuiCtrlCreateRadio("Group 17", 15, 480, 200)
        GUICtrlCreateGroup ("",-99,-99,1,1);close group 

GUICtrlCreateTabitem ("") ; end tabitem definition

;GUICtrlCreateLabel ("label3", 20,130,50,20)

GUISetState ()

; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
;======================================================HP Laptops=====================================================================================
Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $tab0ok1
    If GUICtrlRead($1a) = $GUI_CHECKED Then
        $font="Times New Roman"
        $tab=GUICtrlCreateTab (2,5, 350,525)
        $tab1=GUICtrlCreateTabitem ("Tab 1")
      ;-GUICtrlSetState(-1,$GUI_SHOW) ; will be display first
      ;$Pic1 = GUICtrlCreatePic("C:\scripts\logos\PIC.bmp", 230, 57, 108, 100, BitOR($SS_NOTIFY,$WS_GROUP))
        $tab0ok1=GUICtrlCreateButton ("Install", 278,535,74,23)
        GUISetFont (12, 700, 1, $font)
        GUICtrlCreateGroup ("Software", 10, 50, 335, 470)
;GUICtrlCreateLabel ("Software List", 10,50,200,20)
        GUICtrlSetColor(-1,0x052C65)  ; Dark Blue
        GUISetFont(9, 300)
            $chkfiletrack = GUICtrlCreateCheckbox("App 1", 15, 80)      
            GuiCtrlSetState(-1, $GUI_CHECKED)
            $chkpbbase = GUICtrlCreateCheckbox("App 2", 15, 105,-1)
            GuiCtrlSetState(-1, $GUI_CHECKED)
            $chkclv = GUICtrlCreateCheckbox("App 3", 15, 130)
            GuiCtrlSetState(-1, $GUI_CHECKED)
            $chkmsgmngr = GUICtrlCreateCheckbox("App 4", 15, 155)
            GuiCtrlSetState(-1, $GUI_CHECKED)
            $chkmobius = GUICtrlCreateCheckbox("App 5", 15, 180)
            GuiCtrlSetState(-1, $GUI_CHECKED)
            $chkcitrix = GUICtrlCreateCheckbox("App 6", 15, 205)
            GuiCtrlSetState(-1, $GUI_CHECKED)
            $chkOffice = GUICtrlCreateCheckbox("App 7", 15, 230)
            GuiCtrlSetState(-1, $GUI_CHECKED)
            $chknetox = GUICtrlCreateCheckbox("App 8", 15, 255)
            GuiCtrlSetState(-1, $GUI_CHECKED)
        GUICtrlCreateGroup ("",-99,-99,1,1);close group 
        GUICtrlCreateTabitem ("") ; end tabitem definition
        GUISetState ()
    EndIf
    EndSelect



Wend
Edited by Reload_2006

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...