Sign in to follow this  
Followers 0
w_sp8er

AU3GUIXP

6 posts in this topic

#1 ·  Posted (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) :ph34r: ,

"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 by w_sp8er

Share this post


Link to post
Share on other sites



13 views & no replies?

Share this post


Link to post
Share on other sites

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....


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by w_sp8er

Share this post


Link to post
Share on other sites

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....


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0