firman Posted February 10, 2005 Share Posted February 10, 2005 I am writing a program with check boxes so I can select what programs I want to install... it goes like this: #include <GUIConstants.au3> GUICreate("Installs for Computers", 600, 300) GUICtrlCreateLabel("Installs for Computers", 30, 10) $norton_managed = GUICtrlCreateCheckbox ("Norton Managed", 10, 10, 120, 20) $adobe_reader = GUICtrlCreateCheckbox ("Adobe Reader", 10, 30, 120, 20) $adobe_writer = GUICtrlCreateCheckbox ("Adobe Writer", 10, 50, 120, 20) $vnc = GUICtrlCreateCheckbox ("VNC", 10, 70, 120, 20) $logo_arc = GUICtrlCreateCheckbox ("Arc Background", 10, 90, 120, 20) $okbutton = GUICtrlCreateButton("OK", 70, 275, 60) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $okbutton MsgBox(0, "GUI Event", "The Installs will now begin") If $logo_arc = $GUI_CHECKED THEN <-- PART THAT IS WRONG --> Runwait ("\\dell06\installs\logoarc\logoarcdisplay.exe") EndIf Case $msg = $GUI_EVENT_CLOSE MsgBox(0, "GUI Event", "You clicked CLOSE! Exiting...") ExitLoop EndSelect WEnd I need to know what the value of $logo_arc is so that I can see if it should run or not. How do I do that? Link to comment Share on other sites More sharing options...
MHz Posted February 10, 2005 Share Posted February 10, 2005 When you want to read a GUI Control, you need to use GUICtrlRead. #include <GUIConstants.au3> GUICreate("Installs for Computers", 600, 300) GUICtrlCreateLabel("Installs for Computers", 30, 10) $norton_managed = GUICtrlCreateCheckbox ("Norton Managed", 10, 10, 120, 20) $adobe_reader = GUICtrlCreateCheckbox ("Adobe Reader", 10, 30, 120, 20) $adobe_writer = GUICtrlCreateCheckbox ("Adobe Writer", 10, 50, 120, 20) $vnc = GUICtrlCreateCheckbox ("VNC", 10, 70, 120, 20) $logo_arc = GUICtrlCreateCheckbox ("Arc Background", 10, 90, 120, 20) $okbutton = GUICtrlCreateButton("OK", 70, 275, 60) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $okbutton MsgBox(0, "GUI Event", "The Installs will now begin") If GUICtrlRead($logo_arc) = $GUI_CHECKED THEN <-- PART FIXED Runwait ("\\dell06\installs\logoarc\logoarcdisplay.exe") EndIf Case $msg = $GUI_EVENT_CLOSE MsgBox(0, "GUI Event", "You clicked CLOSE! Exiting...") ExitLoop EndSelect WEnd Link to comment Share on other sites More sharing options...
firman Posted February 10, 2005 Author Share Posted February 10, 2005 You are a life saver. Thank you 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