mist3r Posted September 20, 2006 Share Posted September 20, 2006 Ok, this is a small fragment of the big picture. I've got enough install scripts for small applications and checks for the pc's I have to manage at work. Now im wanting to make 1 big program/script to manage the rest of the scripts. Basically an installer to run each script depending on which boxes the user selects. First things first... check this out. baring in mind this is the very first time i've used the GUI functions #include <GUIConstants.au3> $Form1 = GUICreate("Installation Form", 220,140) $ck1 = GUICtrlCreateCheckbox("Change Room Location", 40, 10, 300, 20) $ck2 = GUICtrlCreateCheckbox("Install Proxy", 40, 30, 250, 20) $btn = GUICtrlCreateButton( "Install", 40, 80, 100, 35) GUISetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $btn If GUICtrlRead($ck1) = $GUI_CHECKED then ; Script Start - Change ROOM location RegWrite ( "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment" ,"LOCATION", "REG_SZ", "607" ) $newLocation = RegRead( "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment" ,"LOCATION") msgbox(0,"","" & $newLocation & "") EndIf If GUICtrlRead($ck2) = $GUI_CHECKED then ;Proxy Checker RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ", "proxy.embc.org.uk:80") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", "1") Endif Case Else ;;;;;;; EndSelect WEnd Exit oÝ÷ ØÚ0hî²Ü(׫x"~Øb²+-êâpk&¢ë]¢)àÒ/y©ky§rmë®*m²ájwZ²Ç©z¶yø¥zƧ˲Z¥v+[yæ¬êí¡ì^q«¢+ÙèÀäÈíÁÑ ÀäÈíѼÀäÈíÕѽ¥Ð¹áÍÉ¥ÁÐĹÔÌí¥¹Íѱ°ÁɽɴÄ)èÀäÈíÁÑ ÀäÈíѼÀäÈíÕѽ¥Ð¹áÍÉ¥ÁÐȹÔÌí¥¹Íѱ°ÁɽɴÈ( rather then copying the existing script text into the over all script? Also any error reporting ideas please incase 1 installation fails that it will carry on or something? Thanks, any advice appreciated!! Link to comment Share on other sites More sharing options...
jvanegmond Posted September 20, 2006 Share Posted September 20, 2006 You could also #include your scripts into the installer script. github.com/jvanegmond Link to comment Share on other sites More sharing options...
mist3r Posted September 20, 2006 Author Share Posted September 20, 2006 Ah brillient! Yus thanks . Also, im thinking of making it detect if somethings already there and checking the box for the user on load. Im reading up on styles and im finding the examples in the help file alot more difficult then the rest when it comes to GUICtrlSetData. ;Checks $regCheck = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable") if $regCheck = 1 Then GUICtrlSetData(4,"Checkbox", 1) Endif All very confused. Especially making a checkbox ticked initially if that program or setting is already inplace. How's GUI Control Styles actually used within a script? Sorry for all the n00bish questions. Thanks again and well played Manadar Link to comment Share on other sites More sharing options...
mist3r Posted September 20, 2006 Author Share Posted September 20, 2006 Aah ok found the right 1. GUICtrlSetState (4, 1) Still confused about the styles though. Cheers 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