w_sp8er Posted July 13, 2004 Share Posted July 13, 2004 (edited) Here is the code I'm having problems with (I can post the complete code if requested): Dim $SetupXP, $InstallPrograms, $InstallOpenOffice, $CopyFiles If EnvGet("OBJ18") == "CHECKED" Then $SetupXP = "SetupXP" Else $SetupXP = "DontSetupXP" EndIf If EnvGet("OBJ19") == "CHECKED" Then $InstallPrograms = "InstallPrograms" Else $InstallPrograms = "DontInstallPrograms" EndIf If EnvGet("OBJ20") == "CHECKED" Then $InstallOpenOffice = "InstallOpenOffice" Else $InstallOpenOffice = "DontInstallOpenOffice" EndIf If EnvGet("OBJ21") == "CHECKED" Then $CopyFiles = "CopyFiles" Else $CopyFiles = "CopyFiles" EndIf ;Run('"Script Files\Off The Net.exe" ' & $SetupXP & ' ' & $InstallPrograms & ' ' & $InstallOpenOffice & ' ' & $CopyFiles) MsgBox(0,"Run Command",'"Script Files\Off The Net.exe" ' & $SetupXP & ' ' & $InstallPrograms & ' ' & $InstallOpenOffice & ' ' & $CopyFiles) with the Run command ending up like this, "Script Files\Off The Net.exe" SetupXP InstallPrograms Install OpenOffice CopyFiles or if "Install OpenOffice" is unchecked (for example), "Script Files\Off The Net.exe" SetupXP InstallPrograms DontInstallOpenOffice CopyFiles The problem is that is what is displayed (even with some UNCHECKED) , "Script Files\Off The Net.exe" DontSetupXP DontInstallPrograms DontInstallOpenOffice CopyFiles Any help would be much appreciated! Thank you for taking the time to read this. w_sp8er EDIT: Made Shorter Edited July 13, 2004 by w_sp8er Link to comment Share on other sites More sharing options...
w_sp8er Posted July 13, 2004 Author Share Posted July 13, 2004 13 views & no replies? Link to comment Share on other sites More sharing options...
Developers Jos Posted July 13, 2004 Developers Share Posted July 13, 2004 How are the ENV var set ? Are they set before the program starts? What are their actual values ? You could do a msgbox(4096,'debug',EnvGet("OBJ18") ) to check.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
w_sp8er Posted July 13, 2004 Author Share Posted July 13, 2004 (edited) Ok, here is some code that happens before the above code: ;############# Off The Net ############# $xAlign_CloseFormButtons = 10; left/right $yAlign_CloseFormButtons = 203; up/down Dim $HDDs = _MyFunc_GetAvailDrives_HDD() EnvSet("OBJ17","disabled=1|type=group|text=OTN|w=370|h=63|x=" & $xAlign_CloseFormButtons & "|y=" & $yAlign_CloseFormButtons) EnvSet("OBJ18","type=checkbox|text=Setup XP|h=15|w=90|x=" & $xAlign_CloseFormButtons + 10 & "|y=" & $yAlign_CloseFormButtons + 15 & "|selected=1|disabled=0") EnvSet("OBJ19","type=checkbox|text=Install Programs|h=15|w=90|x=" & $xAlign_CloseFormButtons + 10 & "|y=" & $yAlign_CloseFormButtons + 40 & "|selected=1|disabled=0|checked.enable=20|unchecked.disable=20") EnvSet("OBJ20","type=checkbox|text=Install OpenOffice|h=15|w=100|x=" & $xAlign_CloseFormButtons + 105 & "|y=" & $yAlign_CloseFormButtons + 40 & "|selected=1|disabled=0") EnvSet("OBJ21","type=checkbox|text=Copy Files|h=15|w=90|x=" & $xAlign_CloseFormButtons + 105 & "|y=" & $yAlign_CloseFormButtons + 15 & "|selected=1|disabled=0") EnvSet("OBJ22","type=button|text=Run OTN|h=50|w=-1|x=" & $xAlign_CloseFormButtons + 215 & "|y=" & $yAlign_CloseFormButtons + 10 & "|submit=1|close=1|disabled=0") EnvSet("OBJ23","type=button|text=What's Installed?|h=50|w=90|x=" & $xAlign_CloseFormButtons + 275 & "|y=" & $yAlign_CloseFormButtons + 10 & "|submit=1|close=0|run=Install OTN Programs Silently\What's Installed.exe|disabled=0") EnvSet("OBJ24","type=button|text=Exit|h=60|w=30|x=" & $xWindowWidth - 40 & "|y=" & $yAlign_CloseFormButtons + 5 & "|close=1|disabled=0") ;############# Run GUI ############# RunWait("Script Files\au3guixp.exe") the thing is that my previous script used 'action=1' (I had to copy the script to a hdd for it to work) & this time I'm using 'action=4' (to enable it to run from a non-writable drive, eg. cdrom) Edited July 13, 2004 by w_sp8er Link to comment Share on other sites More sharing options...
Developers Jos Posted July 13, 2004 Developers Share Posted July 13, 2004 The GETENV doesn't work because the changes that au3guixp.exe makes are not save to the Environment of the autoit3 script. YOu will ghave to use and INI or use action=8 to communicate the varaiables via the windowtitle. Check out the StudyMe.au3 that comes with the program.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
w_sp8er Posted July 13, 2004 Author Share Posted July 13, 2004 Problem Solved by JdeB! Seehttp://www.autoitscript.com/forum/index.php?showtopic=3707for the solution.Mod please close. 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