Jump to content

Recommended Posts

Posted
Trying to add few controls in an AutoIT dialog box that I'm using in Win PE during OS deployments.
it's a small thing that I'm trying to add here that'll add more control to the dialog.
 
Defined Global variables that can be imported outside AutoIT executable
 
Global $strOSConfig, $strOS, $strOSPlusApps
 
In the main function that will call out the user-selection, defined these as local vars
 
Local $OSConfig, $OS, $OSPlusApps
 
 
here's the KODA GUI snip for this--
 
$OSConfig = GUICtrlCreateLabel("OSConfig:", 16, 312, 69, 17)
GUICtrlSetFont(-1, 8, 400, 0, "GUIFont")
$OS = GUICtrlCreateButton("Select OS Only", 110, 312, 129, 25)
$OSPlusApps = GUICtrlCreateButton("Select OS with Apps", 280, 312, 129, 25)
 
 
Inside the While loop to keep the GUI running until dialog box is closed, here's a snip for these vars--
 
 
; Check for OS Config selection
If (StringLen($OS) > 0) Then
$strOS = True
 ElseIf (StringLen($OSPlusApps) >0) Then
$strOSPlusApps = True
EndIf
 
 
 
$msg  = GUIGetMsg()
$msg1 = GUIGetMsg()
$msg2 = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg1 = $OS
GUISetState(@SW_SHOW)
$strOS = GUICtrlRead($OS)
Case $msg2 = $OSPlusApps
GUISetState(@SW_SHOW)
$strOSPlusApps = GUICtrlRead($OSPlusApps)
 
 
 
Main intent is to have these choices populated in the following .vbs script--
 
 
 
FileWriteLine($OutFile, "Dim TSEnv")
FileWriteLine($OutFile, "")
FileWriteLine($OutFile, Chr(39) & " Connect to Task Sequence")
FileWriteLine($OutFile, "Set TSEnv = CreateObject(" & Chr(34) & "Microsoft.SMS.TSEnvironment" & Chr(34) & ")")
FileWriteLine($OutFile, "")
FileWriteLine($OutFile, Chr(39) & " Write Task Sequence Variables")
FileWriteLine($OutFile, "TSEnv(" & Chr(34) & "OSDComputerName" & Chr(34) & ") = " & Chr(34) & $strOSDComputerName & Chr(34))
FileWriteLine($OutFile, "TSEnv(" & Chr(34) & $strUserNameTSVariable & Chr(34) & ") = " & Chr(34) & $strUserName & Chr(34))
FileWriteLine($OutFile, "TSEnv(" & Chr(34) & "OSOnly" & Chr(34) & ") = " & Chr(34) & $strOS & Chr(34))
FileWriteLine($OutFile, "TSEnv(" & Chr(34) & "OSWithApps" & Chr(34) & ") = " & Chr(34) & $strOSPlusApps & Chr(34))
 
It shows up fine in the GUI however when I review the generated .vbs it shows the value for both the variables however what I want is that it should become TRUE for whichever radionbutton user selects last before he/.she finishes the program.
 
any lead would be highly appreciated.
 
kindly let me know if you need more info that can expedite this.
 
thank you in advance.
 
Posted

I dont realy know what the problem is, what output are you getting and what output do you expect?

Maybe post your entire script so its easier to replicate. (Use code tags!)

Posted

BTW: Could you please give a meaningful title to your threads? Everyone on this forum is looking for assistance ;)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...