Sign in to follow this  
Followers 0
myksharma

Need Assistance

4 posts in this topic

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.
 

Share this post


Link to post
Share on other sites



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!)

Share this post


Link to post
Share on other sites

Thanks for the reply Geir1983.

sent you a PM with the attachment. don't see a picture insert here.

Share this post


Link to post
Share on other sites

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 2017-02-03 - Version 1.4.7.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

 

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