MadBoy Posted January 11, 2006 Share Posted January 11, 2006 Hey, i pasted the code on the bottom. I'm having little problem with checkbox treeview that gets actived if i choose radio_7 button. Checkbox apears and i can choose as many as i want. But then i would like to click 'Zainstaluj" and had action like If $label10 is check install this, if $label11 is clicked install that. So if I would have like 4 checkboxes check it would install 4 apriopriate programs. Anyone could show me the path ? And the 2nd problem i have is with group_1 and group_2. How to make it that when i choose some 'profile' (radio box from 1 to 6) to uncheck itself when i click on radio7 button and vice versa . Hope all what i wrote is clear ;/ If you guys need me to translate the comments to english i can do it and repaste the code but i think it shouldn't be problem. expandcollapse popup; Installer #NoTrayIcon ; Dane programu $autor = "Me" ; Wersja;) $version = 0.7 ; Lokalizacja - Nazwa serwera $location = "\\server\Install" #include <GUIConstants.au3> ;FileInstall("c:\logo.gif", "C:\Windows\Temp.gif") Opt("GUICoordMode", 1) GUICreate("Installer ver. " & $version & " - " & $autor, 600,460) ; Logo ;$n=GUICtrlCreatePic("c:\Windows\Temp.gif",0,0, $position2 + 75,35) $tab=GUICtrlCreateTab (10,5, 585,450) ; OPROGRAMOWANIE - MENU $tab0=GUICtrlCreateTabitem ( "Programy") ; Grupa pierwsza - profile $nr0 = 14; pierwsza wspolrzedna kontrolek $nr1 = 17; pierwsza wspolrzedna dla guzikow radio tabelki $nr2 = 70; druga wspolrzedna dla guzikow radio tabelki $nr3 = 16; $position1 = 19 $position2 = 300 $nr_button1 = 450 $nr_button2 = 400 ; Utworzenie kontrolek $button_1 = GUICtrlCreateButton ("Zainstaluj", $nr_button1, $nr_button2, 120, 40) $group_1 = GUICtrlCreateGroup ("Wybierz profil:", $nr0, 50, 175, 220) GUIStartGroup() $radio_1 = GUICtrlCreateRadio ("Standardowy", $nr1, $nr2, 150, 20) $radio_2 = GUICtrlCreateRadio ("Standardowy mobilny", $nr1, $nr2 + 30, 150, 20) $radio_3 = GUICtrlCreateRadio ("Zaawansowany", $nr1, $nr2 + 60, 150, 20) $radio_4 = GUICtrlCreateRadio ("Zaawansowany mobilny", $nr1, $nr2 + 90, 150, 20) $radio_5 = GUICtrlCreateRadio ("Super", $nr1, $nr2 +120, 150, 20) $radio_6 = GUICtrlCreateRadio ("Super mobilny", $nr1, $nr2 + 150, 150, 20) ; Grupa druga - wybor reczny $group_2 = GUICtrlCreateGroup ("", 200, 50, 175, 35) $radio_7 = GUICtrlCreateRadio ("Wybór reczny", 202, 60, 150, 20) ;GUICtrlSetState(-1,$GUI_DISABLE) ;Napisy do GUI wyswietlanego po wybraniu profilu $group_3 = GUICtrlCreateGroup ("", $nr0, 280, 175, 165) GUICtrlSetState(-1,$GUI_HIDE) $Label1= GUICtrlCreateLabel ("", $position1, $position2, 150, 20) $Label2= GUICtrlCreateLabel ("", $position1, $position2 + 15, 150, 20) $Label3= GUICtrlCreateLabel ("", $position1, $position2 + 30, 150, 20) $Label4= GUICtrlCreateLabel ("", $position1, $position2 + 45, 150, 20) $Label5= GUICtrlCreateLabel ("", $position1, $position2 + 60, 150, 20) $Label6= GUICtrlCreateLabel ("", $position1, $position2 + 75, 150, 20) $Label7= GUICtrlCreateLabel ("", $position1, $position2 + 90, 150, 20) $Label8= GUICtrlCreateLabel ("", $position1, $position2 + 105, 150, 20) $Label9= GUICtrlCreateLabel ("", $position1, $position2 + 120, 150, 20) ;GUI z CheckBox-ami dla wyboru recznego $wybor= GUICtrlCreateTreeView (200,90,175,180,BitOr($TVS_CHECKBOXES,$TVS_HASBUTTONS,$TVS_HASLINES,$TVS_LINESATROOT,$TVS_DISABLEDRAGDROP,$TVS_SHOWSELALWAYS),$WS_EX_CLIENTEDGE) GUICtrlSetState(-1,$GUI_HIDE) $label10 = GuiCtrlCreateTreeViewItem("7 zip", $wybor) $label11 = GuiCtrlCreateTreeViewItem("Adobe Acrobat 7.0", $wybor) $label12 = GuiCtrlCreateTreeViewItem("Cisco VPN 4.7", $wybor) $label13 = GuiCtrlCreateTreeViewItem("Lotus Notes 5.02c", $wybor) $label14 = GuiCtrlCreateTreeViewItem("Lotus Notes 5.10a", $wybor) $label15 = GuiCtrlCreateTreeViewItem("Microsoft Office XP", $wybor) $label16 = GuiCtrlCreateTreeViewItem("Microsoft Office 2003", $wybor) $label17 = GuiCtrlCreateTreeViewItem("Microsoft Project 2003", $wybor) $label18 = GuiCtrlCreateTreeViewItem("Microsoft Visio 2003", $wybor) $label19 = GuiCtrlCreateTreeViewItem("Symantec Antivirus", $wybor) ; STEROWNIKI MENU $tab1=GUICtrlCreateTabitem ("Sterowniki") $button_2 = GUICtrlCreateButton ("Wyszukaj sterowniki", $nr_button1, $nr_button2, 120, 40) $treeview = GUICtrlCreateTreeView ($nr0,50,300,250,BitOr($TVS_HASBUTTONS,$TVS_HASLINES,$TVS_LINESATROOT,$TVS_DISABLEDRAGDROP,$TVS_SHOWSELALWAYS),$WS_EX_CLIENTEDGE) ;---- $maxdataitem = GUICtrlCreateTreeViewitem ("Maxdata",$treeview) $3100Xitem = GUICtrlCreateTreeViewitem ("Maxdata 3100X",$maxdataitem) $3150Xitem = GUICtrlCreateTreeViewitem ("Maxdata 3100X",$maxdataitem) $3200Xitem = GUICtrlCreateTreeViewitem ("Maxdata 3200X",$maxdataitem) $6100Xitem = GUICtrlCreateTreeViewitem ("Maxdata 6100X",$maxdataitem) $7000Xitem = GUICtrlCreateTreeViewitem ("Maxdata 7000X",$maxdataitem) $7000DXitem = GUICtrlCreateTreeViewitem ("Maxdata 7000X",$maxdataitem) $7100Xitem = GUICtrlCreateTreeViewitem ("Maxdata 7100X",$maxdataitem) $8000Xitem = GUICtrlCreateTreeViewitem ("Maxdata 8000X",$maxdataitem) $8100ISitem = GUICtrlCreateTreeViewitem ("Maxdata 8100IS",$maxdataitem) $8100Xitem = GUICtrlCreateTreeViewitem ("Maxdata 8100X",$maxdataitem) ;---- $compaqitem = GUICtrlCreateTreeViewitem ("HP Compaq",$treeview) $evon150item = GUICtrlCreateTreeViewitem ("Compaq EVO N150",$compaqitem) $evon160item = GUICtrlCreateTreeViewitem ("Compaq EVO N160",$compaqitem) ;---- $fujitsuitem = GUICtrlCreateTreeViewitem ("Fujitsu-Siemens",$treeview) $fujitsuP300SiSitem = GUICtrlCreateTreeViewitem ("Fujitsu-Siemens P300 - SiS661",$fujitsuitem) $fujitsuP320SiSitem = GUICtrlCreateTreeViewitem ("Fujitsu-Siemens P320 - SiS661",$fujitsuitem) ;---- $toshibaitem = GUICtrlCreateTreeViewitem ("Toshiba",$treeview) ;--- $ibmitem = GUICtrlCreateTreeViewitem ("Ibm",$treeview) GUICtrlCreateTabitem ("") ; Show the GUI GUISetState () ;----------------------------------------------------------------------------- ;----------------------------------------------------------------------------- ;----------------------------------------------------------------------------- ;----------------------------------------------------------------------------- ;----------------------------------------------------------------------------- ; Sciezki do programow $7zip = $location &"\Main\Zip\zip.exe /S" $7zip_comment = "7zip" $Adobe7 = $location &"\Main\Adobe_Acrobat\Adobe_Reader_7.0.msi -qn" $Adobe7_comment = "Adobe Acrobat Reader 7.0" $Notes502 = $location &"\Main\Lotus_Notes_5.02c\Setup.exe -s -f1 SETUP.ISS" $Notes502_comment = "Lotus Notes 5.02c" $Notes510 = $location &"\Main\Lotus_Notes_5.10a\Setup.exe -s -f1 SETUP.ISS" $Notes510_comment = "Lotus Notes 5.10a" $Main = $location &"\Files\Main.bat" $Main_comment = "Windows - Personalizacja" $OfficeXP = $location &"\Main\Microsoft_OfficeXP\setup.exe TRANSFORMS=Unattended.MST /qb-" $OfficeXP_comment = "Microsoft Office XP" $Office2003 = $location &"\Advanced\Microsoft_Office2003\setup.exe TRANSFORMS=Unattended.MST /qb-" $Office2003_comment = "Microsoft Office 2003" $Project2003 = $location &"\Advanced\Microsoft_Project2003\setup.exe TRANSFORMS=Unattended.MST /qb-" $Project2003_comment = "Microsoft Project 2003" $Symantec = $location &"\Main\Symantec_Antivirus\Symantec_AntiVirus.msi /qn RUNLIVEUPDATE=0 REBOOT=REALLYSUPPRESS" $Symantec_comment = "Symantec Antivirus 10" $Visio2003 = $location &"\Advanced\Microsoft_Visio2003\setup.exe TRANSFORMS=Unattended.MST /qb-" $Visio2003_comment = "Microsoft Visio 2003" $Vpn = $location &"\Main\Cisco_VPN\setup.exe" $Vpn_comment = "Vpn Client 4.7" While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE FileRecycle ("C:\Windows\Temp.gif") Exit Case $msg = $radio_1 GUICtrlSetState($group_3, $GUI_SHOW) GUICtrlSetData($group_3, "Do zainstalowania:") GUICtrlSetData( $Label1, $7zip_comment) GUICtrlSetData( $Label2, $Adobe7_comment) GUICtrlSetData( $Label3, $Notes502_comment) GUICtrlSetData( $Label4, $OfficeXP_comment) GUICtrlSetData( $Label5, $Symantec_comment) GUICtrlSetData( $Label6, $Main_comment) GUICtrlSetData( $Label7, "") GUICtrlSetData( $Label8, "") GUICtrlSetData( $Label9, "") Case $msg = $radio_2 GUICtrlSetState($group_3, $GUI_SHOW) GUICtrlSetData($group_3, "Do zainstalowania:") GUICtrlSetData( $Label1, $7zip_comment) GUICtrlSetData( $Label2, $Adobe7_comment) GUICtrlSetData( $Label3, $Notes502_comment) GUICtrlSetData( $Label4, $OfficeXP_comment) GUICtrlSetData( $Label5, $Symantec_comment) GUICtrlSetData( $Label6, $Main_comment) GUICtrlSetData( $Label7, $Vpn_comment) GUICtrlSetData( $Label8, "") GUICtrlSetData( $Label9, "") Case $msg = $radio_3 GUICtrlSetState($group_3, $GUI_SHOW) GUICtrlSetData($group_3, "Do zainstalowania:") GUICtrlSetData( $Label1, $7zip_comment) GUICtrlSetData( $Label2, $Adobe7_comment) GUICtrlSetData( $Label3, $Notes510_comment) GUICtrlSetData( $Label4, $Office2003_comment) GUICtrlSetData( $Label5, $Symantec_comment) GUICtrlSetData( $Label6, $Main_comment) GUICtrlSetData( $Label7, "") GUICtrlSetData( $Label8, "") GUICtrlSetData( $Label9, "") Case $msg = $radio_4 GUICtrlSetState($group_3, $GUI_SHOW) GUICtrlSetData($group_3, "Do zainstalowania:") GUICtrlSetData( $Label1, $7zip_comment) GUICtrlSetData( $Label2, $Adobe7_comment) GUICtrlSetData( $Label3, $Notes510_comment) GUICtrlSetData( $Label4, $Office2003_comment) GUICtrlSetData( $Label5, $Symantec_comment) GUICtrlSetData( $Label6, $Main_comment) GUICtrlSetData( $Label7, $Vpn_comment) GUICtrlSetData( $Label8, "") GUICtrlSetData( $Label9, "") Case $msg = $radio_5 GUICtrlSetState($group_3, $GUI_SHOW) GUICtrlSetData($group_3, "Do zainstalowania:") GUICtrlSetData( $Label1, $7zip_comment) GUICtrlSetData( $Label2, $Adobe7_comment) GUICtrlSetData( $Label3, $Notes510_comment) GUICtrlSetData( $Label4, $Office2003_comment) GUICtrlSetData( $Label5, $Project2003_comment) GUICtrlSetData( $Label6, $Visio2003_comment) GUICtrlSetData( $Label7, $Symantec_comment) GUICtrlSetData( $Label8, $Main_comment) GUICtrlSetData( $Label9, "") Case $msg = $radio_6 GUICtrlSetState($group_3, $GUI_SHOW) GUICtrlSetData($group_3, "Do zainstalowania:") GUICtrlSetData( $Label1, $7zip_comment) GUICtrlSetData( $Label2, $Adobe7_comment) GUICtrlSetData( $Label3, $Notes510_comment) GUICtrlSetData( $Label4, $Office2003_comment) GUICtrlSetData( $Label5, $Project2003_comment) GUICtrlSetData( $Label6, $Visio2003_comment) GUICtrlSetData( $Label7, $Symantec_comment) GUICtrlSetData( $Label8, $Main_comment) GUICtrlSetData( $Label9, $Vpn_comment) Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_1),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe$position1, "", @SW_HIDE) RunWait($Notes502, "") RunWait($OfficeXP, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Main, "") Exit Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_2),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe$position1, "", @SW_HIDE) RunWait($Notes502, "") RunWait($OfficeXP, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Vpn, "") RunWait($Main, "") Exit Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_3),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe$position1, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Main, "") Exit Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_4),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe$position1, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Vpn, "") RunWait($Main, "") Exit Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_5),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe$position1, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait($Project2003, "") RunWait($Visio2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Main, "") Exit Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_6),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe$position1, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait($Project2003, "") RunWait($Visio2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Vpn, "") RunWait($Main, "") Exit Case $msg = $radio_7 GUICtrlSetState($wybor, $GUI_SHOW) EndSelect WEnd My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
MadBoy Posted January 12, 2006 Author Share Posted January 12, 2006 Noone that could help? Don't mind the $Adobe$position1 .. happend when i used replace function. My little company: Evotec (PL version: Evotec) 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