MadBoy Posted January 6, 2006 Share Posted January 6, 2006 (edited) How to make it work ;/ Always when i compile it in the code, the compile hangs and nothings starts. I think the problem is somewhere within Case $msg = $drop_1 or so but can't find out where exactly. $drop_1 = GUICtrlCreateCombo("Warszawa", 30, 30, 85, 60, $CBS_DROPDOWNLIST) $drop_2 = GUICtrlSetData(-1,"Wroclaw") $drop_3 = GUICtrlSetData(-1,"Katowice") $location = "\\server\Install" While 1 $msg = GUIGetMsg() Select Case $msg = $drop_1 $location = "\\server1\Install" GUICtrlCreateLabel ($location, 30, 500, 150) Case $msg = $drop_2 $location = "\\server2\Install" GUICtrlCreateLabel ($location, 30 520, 150) Case $msg = $drop_3 $location = "\\server3\Install" GUICtrlCreateLabel ($location, 30 540, 150) EndSelect WEnd Edited January 6, 2006 by MadBoy My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
seandisanti Posted January 6, 2006 Share Posted January 6, 2006 How to make it work ;/ Always when i compile it in the code, the compile hangs and nothings starts. I think the problem is somewhere within Case $msg = $drop_1 or so but can't find out where exactly. $drop_1 = GUICtrlCreateCombo("Warszawa", 30, 30, 85, 60, $CBS_DROPDOWNLIST) $drop_2 = GUICtrlSetData(-1,"Wroclaw") $drop_3 = GUICtrlSetData(-1,"Katowice") $location = "\\server\Install" While 1 $msg = GUIGetMsg() Select Case $msg = $drop_1 $location = "\\server1\Install" GUICtrlCreateLabel ($location, 30, 500, 150) Case $msg = $drop_2 $location = "\\server2\Install" GUICtrlCreateLabel ($location, 30 520, 150) Case $msg = $drop_3 $location = "\\server3\Install" GUICtrlCreateLabel ($location, 30 540, 150) EndSelect WEndi'm sorry i'm not sure i'm understanding correctly, is the script not compiling? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 6, 2006 Moderators Share Posted January 6, 2006 Russian Roulette? Try posting the actual code! 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. Link to comment Share on other sites More sharing options...
MadBoy Posted January 6, 2006 Author Share Posted January 6, 2006 Okey, here goes whole code expandcollapse popup#NoTrayIcon ; Dane programu $autor = "Me" $version = 0.5 #include <GUIConstants.au3> FileInstall("c:\logo.gif", "C:\Windows\Temp.gif") Opt("GUICoordMode", 1) GUICreate("Installer ver. " & $version & " - " & $autor, 375,500) ; Logo $n=GUICtrlCreatePic("c:\Windows\Temp.gif",0,0, 375,35) ; Dropdown list $drop_1 = GUICtrlCreateCombo("Warszawa", 30, 30, 85, 60, $CBS_DROPDOWNLIST) $drop_2 = GUICtrlSetData(-1,"Wroclaw") $drop_3 = GUICtrlSetData(-1,"Katowice") $drop_4 = GUICtrlSetData(-1,"Krakow") $drop_5 = GUICtrlSetData(-1,"Gliwice") $drop_6 = GUICtrlSetData(-1,"Lublin") ; Lokalizacja - Nazwa serwera $location = "\\server\Install" While 1 $msg = GUIGetMsg() Select Case $msg = $drop_2 $location = "\\server1\Install" GUICtrlCreateLabel ($location, 30, 500, 150) Case $msg = $drop_3 $location = "\\server21\Install" GUICtrlCreateLabel ($location, 30 520, 150) EndSelect WEnd ; 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" ; Utworzenie kontrolek $button_1 = GUICtrlCreateButton ("Zainstaluj", 50, 450, 120, 40) ; Grupa pierwsza - profile $group_1 = GUICtrlCreateGroup ("Wybierz profil:", 2, 50, 175, 220) GUIStartGroup() $radio_1 = GUICtrlCreateRadio ("Standardowy", 5, 70, 150, 20) $radio_2 = GUICtrlCreateRadio ("Standardowy mobilny", 5, 100, 150, 20) $radio_3 = GUICtrlCreateRadio ("Zaawansowany", 5, 130, 150, 20) $radio_4 = GUICtrlCreateRadio ("Zaawansowany mobilny", 5, 160, 150, 20) $radio_5 = GUICtrlCreateRadio ("Super", 5, 190, 150, 20) $radio_6 = GUICtrlCreateRadio ("Super mobilny", 5, 220, 150, 20) ; Grupa druga - wybor reczny $group_2 = GUICtrlCreateGroup ("", 200, 50, 175, 35) $radio_7 = GUICtrlCreateRadio ("Wybór ręczny", 202, 60, 150, 20) ;GUICtrlSetState(-1,$GUI_DISABLE) ; Show the GUI GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE FileRecycle ("C:\Windows\Temp.gif") Exit Case $msg = $radio_1 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes502_comment, 7, 330, 150) GUICtrlCreateLabel ($OfficeXP_comment, 7, 345, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 360, 150) GUICtrlCreateLabel ($Main_comment, 7, 375, 150) GUICtrlCreateLabel (" ", 7, 390, 150) GUICtrlCreateLabel (" ", 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_2 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes502_comment, 7, 330, 150) GUICtrlCreateLabel ($OfficeXP_comment, 7, 345, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 360, 150) GUICtrlCreateLabel ($Main_comment, 7, 375, 150) GUICtrlCreateLabel ($Vpn_comment, 7, 390, 150) GUICtrlCreateLabel (" ", 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_3 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes510_comment, 7, 330, 150) GUICtrlCreateLabel ($Office2003_comment, 7, 345, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 360, 150) GUICtrlCreateLabel ($Main_comment, 7, 375, 150) GUICtrlCreateLabel (" ", 7, 390, 150) GUICtrlCreateLabel (" ", 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_4 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes510_comment, 7, 330, 150) GUICtrlCreateLabel ($Office2003_comment, 7, 345, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 360, 150) GUICtrlCreateLabel ($Main_comment, 7, 375, 150) GUICtrlCreateLabel ($Vpn_comment, 7, 390, 150) GUICtrlCreateLabel (" ", 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_5 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes510_comment, 7, 330, 150) GUICtrlCreateLabel ($Office2003_comment, 7, 345, 150) GUICtrlCreateLabel ($Project2003_comment, 7, 360, 150) GUICtrlCreateLabel ($Visio2003_comment, 7, 375, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 390, 150) GUICtrlCreateLabel ($Main_comment, 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_6 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes510_comment, 7, 330, 150) GUICtrlCreateLabel ($Office2003_comment, 7, 345, 150) GUICtrlCreateLabel ($Project2003_comment, 7, 360, 150) GUICtrlCreateLabel ($Visio2003_comment, 7, 375, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 390, 150) GUICtrlCreateLabel ($Main_comment, 7, 405, 150) GUICtrlCreateLabel ($Vpn_comment, 7, 420, 150) Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_1),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes502, "") RunWait($OfficeXP, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_2),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes502, "") RunWait($OfficeXP, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Vpn, "") RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_3),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_4),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Vpn, "") RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_5),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait($Project2003, "") RunWait($Visio2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_6),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait($Project2003, "") RunWait($Visio2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Vpn, "") RunWait($Main, "") Case $msg = $radio_7 GUICtrlSetState(-1,$GUI_DISABLE) $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_DISABLE) $7zip = GuiCtrlCreateTreeViewItem("7 zip", $wybor) $Adobe7 = GuiCtrlCreateTreeViewItem("Adobe Acrobat 7.0", $wybor) $CiscoVPN = GuiCtrlCreateTreeViewItem("Cisco VPN 4.7", $wybor) $Lotus502 = GuiCtrlCreateTreeViewItem("Lotus Notes 5.02c", $wybor) $Lotus510 = GuiCtrlCreateTreeViewItem("Lotus Notes 5.10a", $wybor) $OfficeXP = GuiCtrlCreateTreeViewItem("Microsoft Office XP", $wybor) $Office2003 = GuiCtrlCreateTreeViewItem("Microsoft Office 2003", $wybor) $Projec2003 = GuiCtrlCreateTreeViewItem("Microsoft Project 2003", $wybor) $Visio2003 = GuiCtrlCreateTreeViewItem("Microsoft Visio 2003", $wybor) $Symantec = GuiCtrlCreateTreeViewItem("Symantec Antivirus", $wybor) EndSelect WEnd If i will remove While 1 $msg = GUIGetMsg() Select Case $msg = $drop_2 $location = "\\server1\Install" GUICtrlCreateLabel ($location, 30, 500, 150) Case $msg = $drop_3 $location = "\\server21\Install" GUICtrlCreateLabel ($location, 30 520, 150) EndSelect WEnd Code compliles without any problems. IF i put it in... it dies :/ My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
seandisanti Posted January 6, 2006 Share Posted January 6, 2006 Okey, here goes whole code expandcollapse popup#NoTrayIcon ; Dane programu $autor = "Me" $version = 0.5 #include <GUIConstants.au3> FileInstall("c:\logo.gif", "C:\Windows\Temp.gif") Opt("GUICoordMode", 1) GUICreate("Installer ver. " & $version & " - " & $autor, 375,500) ; Logo $n=GUICtrlCreatePic("c:\Windows\Temp.gif",0,0, 375,35) ; Dropdown list $drop_1 = GUICtrlCreateCombo("Warszawa", 30, 30, 85, 60, $CBS_DROPDOWNLIST) $drop_2 = GUICtrlSetData(-1,"Wroclaw") $drop_3 = GUICtrlSetData(-1,"Katowice") $drop_4 = GUICtrlSetData(-1,"Krakow") $drop_5 = GUICtrlSetData(-1,"Gliwice") $drop_6 = GUICtrlSetData(-1,"Lublin") ; Lokalizacja - Nazwa serwera $location = "\\server\Install" While 1 $msg = GUIGetMsg() Select Case $msg = $drop_2 $location = "\\server1\Install" GUICtrlCreateLabel ($location, 30, 500, 150) Case $msg = $drop_3 $location = "\\server21\Install" GUICtrlCreateLabel ($location, 30 520, 150) EndSelect WEnd ; 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" ; Utworzenie kontrolek $button_1 = GUICtrlCreateButton ("Zainstaluj", 50, 450, 120, 40) ; Grupa pierwsza - profile $group_1 = GUICtrlCreateGroup ("Wybierz profil:", 2, 50, 175, 220) GUIStartGroup() $radio_1 = GUICtrlCreateRadio ("Standardowy", 5, 70, 150, 20) $radio_2 = GUICtrlCreateRadio ("Standardowy mobilny", 5, 100, 150, 20) $radio_3 = GUICtrlCreateRadio ("Zaawansowany", 5, 130, 150, 20) $radio_4 = GUICtrlCreateRadio ("Zaawansowany mobilny", 5, 160, 150, 20) $radio_5 = GUICtrlCreateRadio ("Super", 5, 190, 150, 20) $radio_6 = GUICtrlCreateRadio ("Super mobilny", 5, 220, 150, 20) ; Grupa druga - wybor reczny $group_2 = GUICtrlCreateGroup ("", 200, 50, 175, 35) $radio_7 = GUICtrlCreateRadio ("Wybór ręczny", 202, 60, 150, 20) ;GUICtrlSetState(-1,$GUI_DISABLE) ; Show the GUI GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE FileRecycle ("C:\Windows\Temp.gif") Exit Case $msg = $radio_1 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes502_comment, 7, 330, 150) GUICtrlCreateLabel ($OfficeXP_comment, 7, 345, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 360, 150) GUICtrlCreateLabel ($Main_comment, 7, 375, 150) GUICtrlCreateLabel (" ", 7, 390, 150) GUICtrlCreateLabel (" ", 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_2 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes502_comment, 7, 330, 150) GUICtrlCreateLabel ($OfficeXP_comment, 7, 345, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 360, 150) GUICtrlCreateLabel ($Main_comment, 7, 375, 150) GUICtrlCreateLabel ($Vpn_comment, 7, 390, 150) GUICtrlCreateLabel (" ", 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_3 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes510_comment, 7, 330, 150) GUICtrlCreateLabel ($Office2003_comment, 7, 345, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 360, 150) GUICtrlCreateLabel ($Main_comment, 7, 375, 150) GUICtrlCreateLabel (" ", 7, 390, 150) GUICtrlCreateLabel (" ", 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_4 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes510_comment, 7, 330, 150) GUICtrlCreateLabel ($Office2003_comment, 7, 345, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 360, 150) GUICtrlCreateLabel ($Main_comment, 7, 375, 150) GUICtrlCreateLabel ($Vpn_comment, 7, 390, 150) GUICtrlCreateLabel (" ", 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_5 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes510_comment, 7, 330, 150) GUICtrlCreateLabel ($Office2003_comment, 7, 345, 150) GUICtrlCreateLabel ($Project2003_comment, 7, 360, 150) GUICtrlCreateLabel ($Visio2003_comment, 7, 375, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 390, 150) GUICtrlCreateLabel ($Main_comment, 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_6 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes510_comment, 7, 330, 150) GUICtrlCreateLabel ($Office2003_comment, 7, 345, 150) GUICtrlCreateLabel ($Project2003_comment, 7, 360, 150) GUICtrlCreateLabel ($Visio2003_comment, 7, 375, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 390, 150) GUICtrlCreateLabel ($Main_comment, 7, 405, 150) GUICtrlCreateLabel ($Vpn_comment, 7, 420, 150) Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_1),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes502, "") RunWait($OfficeXP, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_2),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes502, "") RunWait($OfficeXP, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Vpn, "") RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_3),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_4),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Vpn, "") RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_5),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait($Project2003, "") RunWait($Visio2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_6),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait($Project2003, "") RunWait($Visio2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Vpn, "") RunWait($Main, "") Case $msg = $radio_7 GUICtrlSetState(-1,$GUI_DISABLE) $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_DISABLE) $7zip = GuiCtrlCreateTreeViewItem("7 zip", $wybor) $Adobe7 = GuiCtrlCreateTreeViewItem("Adobe Acrobat 7.0", $wybor) $CiscoVPN = GuiCtrlCreateTreeViewItem("Cisco VPN 4.7", $wybor) $Lotus502 = GuiCtrlCreateTreeViewItem("Lotus Notes 5.02c", $wybor) $Lotus510 = GuiCtrlCreateTreeViewItem("Lotus Notes 5.10a", $wybor) $OfficeXP = GuiCtrlCreateTreeViewItem("Microsoft Office XP", $wybor) $Office2003 = GuiCtrlCreateTreeViewItem("Microsoft Office 2003", $wybor) $Projec2003 = GuiCtrlCreateTreeViewItem("Microsoft Project 2003", $wybor) $Visio2003 = GuiCtrlCreateTreeViewItem("Microsoft Visio 2003", $wybor) $Symantec = GuiCtrlCreateTreeViewItem("Symantec Antivirus", $wybor) EndSelect WEnd If i will remove While 1 $msg = GUIGetMsg() Select Case $msg = $drop_2 $location = "\\server1\Install" GUICtrlCreateLabel ($location, 30, 500, 150) Case $msg = $drop_3 $location = "\\server21\Install" GUICtrlCreateLabel ($location, 30 520, 150) EndSelect WEnd Code compliles without any problems. IF i put it in... it dies :/the issue is the line: Case $msg = $drop_3 $location = "\\server21\Install" GUICtrlCreateLabel ($location, 30 520, 150)count your commas Link to comment Share on other sites More sharing options...
MadBoy Posted January 6, 2006 Author Share Posted January 6, 2006 No change, i have commented out that line and it doesn't work either :/ It's not that My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
seandisanti Posted January 6, 2006 Share Posted January 6, 2006 No change, i have commented out that line and it doesn't work either :/ It's not thatwhen i add the missing comma after the 30, i am able to compile it with beta or production... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 6, 2006 Moderators Share Posted January 6, 2006 when i add the missing comma after the 30, i am able to compile it with beta or production... Damn, I was just going to say that!!!! And offer another alternative too! While 1 $msg = GUIGetMsg() Select Case $msg = $drop_2 $location = Chr(92)&Chr(92)&'server1'&Chr(92)&'Install' GUICtrlCreateLabel ($location, 30, 500, 150) Case $msg = $drop_3 $location = Chr(92)&Chr(92)&'server1'&Chr(92)&'Install' GUICtrlCreateLabel ($location, 30, 520, 150) EndSelect WEnd 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. Link to comment Share on other sites More sharing options...
MadBoy Posted January 6, 2006 Author Share Posted January 6, 2006 >"C:\Program Files\AutoIt3\SciTe\CompileAU3\CompileAU3.exe" /run /prod /ErrorStdOut /in "C:\Work\AutoIT Scripts\something.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams >Running: (3.1.1.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Work\AutoIT Scripts\something.au3" and nothing happens.. it's like that .. i have to kill process to get it closed. I must be missing something. While 1 $msg = GUIGetMsg() Select Case $msg = $drop_2 $location = "\\server\something" GUICtrlCreateLabel ($location, 30, 500, 150) ; Case $msg = $drop_3 ; $location = "\\server\something" ; GUICtrlCreateLabel ($location, 30, 520, 150) EndSelect WEnd My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
seandisanti Posted January 6, 2006 Share Posted January 6, 2006 >"C:\Program Files\AutoIt3\SciTe\CompileAU3\CompileAU3.exe" /run /prod /ErrorStdOut /in "C:\Work\AutoIT Scripts\something.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams >Running: (3.1.1.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Work\AutoIT Scripts\something.au3" and nothing happens.. it's like that .. i have to kill process to get it closed. I must be missing something. While 1 $msg = GUIGetMsg() Select Case $msg = $drop_2 $location = "\\server\something" GUICtrlCreateLabel ($location, 30, 500, 150) ; Case $msg = $drop_3 ; $location = "\\server\something" ; GUICtrlCreateLabel ($location, 30, 520, 150) EndSelect WEndit looks like you're running it, not compiling it... i haven't tried to run it. Link to comment Share on other sites More sharing options...
seandisanti Posted January 6, 2006 Share Posted January 6, 2006 (edited) Damn, I was just going to say that!!!! And offer another alternative too! While 1 $msg = GUIGetMsg() Select Case $msg = $drop_2 $location = Chr(92)&Chr(92)&'server1'&Chr(92)&'Install' GUICtrlCreateLabel ($location, 30, 500, 150) Case $msg = $drop_3 $location = Chr(92)&Chr(92)&'server1'&Chr(92)&'Install' GUICtrlCreateLabel ($location, 30, 520, 150) EndSelect WEndyour nicotine deprivation is slowing you down, you should get an energy drink to compensate. Just remember: ;$Lost >= $Monster >= $Rockstar > $RedBull If Not $Working Then $EnergyDrink += $Vodka Edited January 6, 2006 by cameronsdad Link to comment Share on other sites More sharing options...
MadBoy Posted January 6, 2006 Author Share Posted January 6, 2006 Ye well i use Scite and i press F5 to test if it works or not. It doesn't. But yes if i compile it to .exe it works but it won't start :/ I'm sure i fucked up something in that While/case lines. Or maybe this is the real issue. Help $drop_1 = GUICtrlCreateCombo("Warszawa", 30, 30, 85, 60, $CBS_DROPDOWNLIST) $drop_2 = GUICtrlSetData(-1,"Wroclaw") $drop_3 = GUICtrlSetData(-1,"Katowice") $drop_4 = GUICtrlSetData(-1,"Krakow") $drop_5 = GUICtrlSetData(-1,"Gliwice") $drop_6 = GUICtrlSetData(-1,"Lublin") My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
seandisanti Posted January 6, 2006 Share Posted January 6, 2006 Ye well i use Scite and i press F5 to test if it works or not. It doesn't. But yes if i compile it to .exe it works but it won't start :/ I'm sure i fucked up something in that While/case lines. Or maybe this is the real issue. Help $drop_1 = GUICtrlCreateCombo("Warszawa", 30, 30, 85, 60, $CBS_DROPDOWNLIST) $drop_2 = GUICtrlSetData(-1,"Wroclaw") $drop_3 = GUICtrlSetData(-1,"Katowice") $drop_4 = GUICtrlSetData(-1,"Krakow") $drop_5 = GUICtrlSetData(-1,"Gliwice") $drop_6 = GUICtrlSetData(-1,"Lublin") no problem, we were just troubleshooting the wrong thing (even though that change had to be made) because we thought you were unable to compile. Will try to run and offer suggestions. Also, if you didn't receive error about invalid syntax, make sure you have your scite definitions up to date with the updater on the download page. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 6, 2006 Moderators Share Posted January 6, 2006 (edited) Note: Had to delete my last post, had all my debug scripts that I use in it too...lol I had to seperate what you were doing to try and get an idea of the outcome you were looking for... It didn't work for me when I just ran it... Your trying to give your GUICtrlSetData() a value in the form of a variable, I don't think this is going to work.. try just setting the value of the data in side of it to a Dim variable or something. I debugged a bit, at least take a look at what I did and it may give you an idea of what to do... understand that though my example works, this is not a good idea to use the the reading of the combo box this way.expandcollapse popupCODE ; Dane programu $autor = "Me" $version = 0.5 #include <GUIConstants.au3> FileInstall("c:\logo.gif", "C:\Windows\Temp.gif") Opt("GUICoordMode", 1) GUICreate("Installer ver. " & $version & " - " & $autor, 375,500) ; Logo $n=GUICtrlCreatePic("c:\Windows\Temp.gif",0,0, 375,35) ; Dropdown list $drop_1 = GUICtrlCreateCombo("Warszawa", 30, 30, 85, 60, $CBS_DROPDOWNLIST) $DummyDrop = GUICtrlSetData(-1, "") $drop_2 = GUICtrlSetData(-1,"Wroclaw") $drop_3 = GUICtrlSetData(-1,"Katowice") $drop_4 = GUICtrlSetData(-1,"Krakow") $drop_5 = GUICtrlSetData(-1,"Gliwice") $drop_6 = GUICtrlSetData(-1,"Lublin") ; Lokalizacja - Nazwa serwera $location = "\\server\Install" CheckCombo() ; 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" ; Utworzenie kontrolek $button_1 = GUICtrlCreateButton ("Zainstaluj", 50, 450, 120, 40) ; Grupa pierwsza - profile $group_1 = GUICtrlCreateGroup ("Wybierz profil:", 2, 50, 175, 220) GUIStartGroup() $radio_1 = GUICtrlCreateRadio ("Standardowy", 5, 70, 150, 20) $radio_2 = GUICtrlCreateRadio ("Standardowy mobilny", 5, 100, 150, 20) $radio_3 = GUICtrlCreateRadio ("Zaawansowany", 5, 130, 150, 20) $radio_4 = GUICtrlCreateRadio ("Zaawansowany mobilny", 5, 160, 150, 20) $radio_5 = GUICtrlCreateRadio ("Super", 5, 190, 150, 20) $radio_6 = GUICtrlCreateRadio ("Super mobilny", 5, 220, 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) ; Show the GUI GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE FileRecycle ("C:\Windows\Temp.gif") Exit Case $msg = $radio_1 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes502_comment, 7, 330, 150) GUICtrlCreateLabel ($OfficeXP_comment, 7, 345, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 360, 150) GUICtrlCreateLabel ($Main_comment, 7, 375, 150) GUICtrlCreateLabel (" ", 7, 390, 150) GUICtrlCreateLabel (" ", 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_2 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes502_comment, 7, 330, 150) GUICtrlCreateLabel ($OfficeXP_comment, 7, 345, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 360, 150) GUICtrlCreateLabel ($Main_comment, 7, 375, 150) GUICtrlCreateLabel ($Vpn_comment, 7, 390, 150) GUICtrlCreateLabel (" ", 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_3 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes510_comment, 7, 330, 150) GUICtrlCreateLabel ($Office2003_comment, 7, 345, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 360, 150) GUICtrlCreateLabel ($Main_comment, 7, 375, 150) GUICtrlCreateLabel (" ", 7, 390, 150) GUICtrlCreateLabel (" ", 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_4 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes510_comment, 7, 330, 150) GUICtrlCreateLabel ($Office2003_comment, 7, 345, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 360, 150) GUICtrlCreateLabel ($Main_comment, 7, 375, 150) GUICtrlCreateLabel ($Vpn_comment, 7, 390, 150) GUICtrlCreateLabel (" ", 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_5 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes510_comment, 7, 330, 150) GUICtrlCreateLabel ($Office2003_comment, 7, 345, 150) GUICtrlCreateLabel ($Project2003_comment, 7, 360, 150) GUICtrlCreateLabel ($Visio2003_comment, 7, 375, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 390, 150) GUICtrlCreateLabel ($Main_comment, 7, 405, 150) GUICtrlCreateLabel (" ", 7, 420, 150) Case $msg = $radio_6 $group_3 = GUICtrlCreateGroup ("Do zainstalowania:", 2, 280, 175, 165) GUICtrlCreateLabel ($7zip_comment, 7, 300, 150) GUICtrlCreateLabel ($Adobe7_comment, 7, 315, 150) GUICtrlCreateLabel ($Notes510_comment, 7, 330, 150) GUICtrlCreateLabel ($Office2003_comment, 7, 345, 150) GUICtrlCreateLabel ($Project2003_comment, 7, 360, 150) GUICtrlCreateLabel ($Visio2003_comment, 7, 375, 150) GUICtrlCreateLabel ($Symantec_comment, 7, 390, 150) GUICtrlCreateLabel ($Main_comment, 7, 405, 150) GUICtrlCreateLabel ($Vpn_comment, 7, 420, 150) Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_1),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes502, "") RunWait($OfficeXP, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_2),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes502, "") RunWait($OfficeXP, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Vpn, "") RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_3),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_4),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Vpn, "") RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_5),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait($Project2003, "") RunWait($Visio2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Main, "") Case $msg = $button_1 AND BitAnd(GUICtrlRead($radio_6),$GUI_CHECKED) = $GUI_CHECKED RunWait($7zip, "") RunWait(@ComSpec & " /c " & $Adobe7, "", @SW_HIDE) RunWait($Notes510, "") RunWait($Office2003, "") RunWait($Project2003, "") RunWait($Visio2003, "") RunWait(@ComSpec & " /c " & $Symantec, "", @SW_HIDE) RunWait($Vpn, "") RunWait($Main, "") Case $msg = $radio_7 GUICtrlSetState(-1,$GUI_DISABLE) $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_DISABLE) $7zip = GuiCtrlCreateTreeViewItem("7 zip", $wybor) $Adobe7 = GuiCtrlCreateTreeViewItem("Adobe Acrobat 7.0", $wybor) $CiscoVPN = GuiCtrlCreateTreeViewItem("Cisco VPN 4.7", $wybor) $Lotus502 = GuiCtrlCreateTreeViewItem("Lotus Notes 5.02c", $wybor) $Lotus510 = GuiCtrlCreateTreeViewItem("Lotus Notes 5.10a", $wybor) $OfficeXP = GuiCtrlCreateTreeViewItem("Microsoft Office XP", $wybor) $Office2003 = GuiCtrlCreateTreeViewItem("Microsoft Office 2003", $wybor) $Projec2003 = GuiCtrlCreateTreeViewItem("Microsoft Project 2003", $wybor) $Visio2003 = GuiCtrlCreateTreeViewItem("Microsoft Visio 2003", $wybor) $Symantec = GuiCtrlCreateTreeViewItem("Symantec Antivirus", $wybor) EndSelect WEnd Func CheckCombo() GUISetState() While 1 Select Case GUICtrlRead($drop_1) = "Wroclaw" $location = "\\server1\Install" GUICtrlCreateLabel ($location, 30, 500, 150) ExitLoop Case GUICtrlRead($drop_1) = "Katowice" $location = "\\server21\Install" GUICtrlCreateLabel ($location, 30 520, 150) ExitLoop EndSelect Sleep(1000) WEnd EndFunc Edited May 1, 2015 by Jon Broken code tag 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. Link to comment Share on other sites More sharing options...
seandisanti Posted January 6, 2006 Share Posted January 6, 2006 no problem, we were just troubleshooting the wrong thing (even though that change had to be made) because we thought you were unable to compile. Will try to run and offer suggestions. Also, if you didn't receive error about invalid syntax, make sure you have your scite definitions up to date with the updater on the download page.your script enters it's infinite loop prior to your GuiSetState(). so it's evaluating $msg before the gui is visible. just move your GuiSetState() line above your while loop that you were having issues with. Link to comment Share on other sites More sharing options...
MadBoy Posted January 6, 2006 Author Share Posted January 6, 2006 Well SMoke, i added that code below not long time ago. It was my last addition and the code stopped to work. Before i just had simple line: $location = "\\server\Install" but since the script is supposed to be used on many servers in diffrent locations i wanted to create dropdown list so the IT Technician would choose what server he wanna use to install those apps. But seems like it fuck's up everything $drop_1 = GUICtrlCreateCombo("Warszawa", 30, 30, 85, 60, $CBS_DROPDOWNLIST) $drop_2 = GUICtrlSetData(-1,"Wroclaw") $drop_3 = GUICtrlSetData(-1,"Katowice") $drop_4 = GUICtrlSetData(-1,"Krakow") $drop_5 = GUICtrlSetData(-1,"Gliwice") $drop_6 = GUICtrlSetData(-1,"Lublin") While 1 $msg = GUIGetMsg() Select Case $msg = $drop_2 $location = "\\server1\Install" GUICtrlCreateLabel ($location, 30, 500, 150) Case $msg = $drop_3 $location = "\\server21\Install" GUICtrlCreateLabel ($location, 30, 520, 150) EndSelect WEnd My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 6, 2006 Moderators Share Posted January 6, 2006 Did you even see what I did? 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. Link to comment Share on other sites More sharing options...
MadBoy Posted January 6, 2006 Author Share Posted January 6, 2006 Yes Smoke Playing with it now. It's hard to play with the code and answer 2 guys at once, especially when answer is already there when i post my answer that stuff isn;t working Sorry for delays then! TNx muchos for help, trying to work it out a bit. Althought the CHeckBox must be shown at same time as all other things. So guy can change the "server" location at any time he wants to. But i think i got idea how to make it... i'll post my progress My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
seandisanti Posted January 6, 2006 Share Posted January 6, 2006 Yes Smoke Playing with it now. It's hard to play with the code and answer 2 guys at once, especially when answer is already there when i post my answer that stuff isn;t working Sorry for delays then! TNx muchos for help, trying to work it out a bit. Althought the CHeckBox must be shown at same time as all other things. So guy can change the "server" location at any time he wants to. But i think i got idea how to make it... i'll post my progress i think you may have missed MY post too...your script enters it's infinite loop prior to your GuiSetState(). so it's evaluating $msg before the gui is visible. just move your GuiSetState() line above your while loop that you were having issues with. Link to comment Share on other sites More sharing options...
MadBoy Posted January 6, 2006 Author Share Posted January 6, 2006 No i didn't. I read both your guys opinions which were very helpfull of course and as you said that GUISetState () when i started to move it around the script worked in some way. I'm still having few problems with it because it doesn't realy 'react' the way it is supposed to, but i'm after hard day at work and preety tired now to think straight ;> SO thanks to both of you guys for your help. For sure i will need more of it. Just not today! Too tired to even understand simple code:/ 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