#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=bag.ico #AutoIt3Wrapper_Outfile=BuildISM.Exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include #include #include #include ;---------------------------------------------------------------------------------------------------------------------------------------- ;Set AutoIt options that change the way information is interpreted ;---------------------------------------------------------------------------------------------------------------------------------------- AutoItSetOption ("CaretCoordMode", 0) AutoItSetOption ("ExpandEnvStrings", 1) AutoItSetOption ("ExpandVarStrings", 1) AutoItSetOption ("GUICloseOnESC", 1) ;AutoItSetOption ("GUICoordMode", 0) AutoItSetOption ("GUIOnEventMode", 1) ;AutoItSetOption ("MustDeclareVars", 1) AutoItSetOption ("PixelCoordMode", 0) AutoItSetOption ("TrayAutoPause", 0) ;AutoItSetOption ("TrayMenuMode", 1) AutoItSetOption ("TrayOnEventMode", 1) AutoItSetOption ("WinDetectHiddenText", 1) AutoItSetOption ("WinSearchChildren", 1) AutoItSetOption ("WinTitleMatchMode", -2) #Region ### START Koda GUI section ### Form=c:\uday_share\automation\ismbuild gui\form1.kxf $Form1_1 = GUICreate("Build ISM Files", 459, 168, 896, 315) GUISetOnEvent($GUI_EVENT_CLOSE, "CloseButton") ;set function to perform when user closes the gui GUISetIcon(@ScriptDir & "\bag.ico", -1) $Group1 = GUICtrlCreateGroup("64 Bit", 8, 8, 217, 105) $Checkbox1 = GUICtrlCreateCheckbox("ERwin Data Modeler", 24, 32, 121, 17) $Checkbox2 = GUICtrlCreateCheckbox("ERwin Navigator", 24, 56, 97, 17) $Checkbox3 = GUICtrlCreateCheckbox("ERwin Mart Server", 24, 80, 113, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("32 Bit", 240, 8, 209, 105) $Checkbox4 = GUICtrlCreateCheckbox("ERwin Data Modeler", 248, 32, 121, 17) $Checkbox5 = GUICtrlCreateCheckbox("ERwin Navigator", 248, 56, 105, 17) $Checkbox6 = GUICtrlCreateCheckbox("ERwin Mart Server", 248, 80, 113, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("Start", 176, 128, 105, 33) GUICtrlSetOnEvent($Button1, "StartBuild") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### #cs While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd #ce While WinGetState($Form1_1) <> 0 ;while gui is being displayed Sleep(100) #cs ;if the user specifies parameters, assume silent installation and disable source validation stage ;if this needs to be changed, the guest client and recorder would need to be modified to handle it $iSVCheckBoxState = GUICtrlGetState($hgRecordInstallation) If (GUICtrlRead($hgInstaller) = "Please select the Installer") Or ((GUICtrlRead($hgParameters) <> "") And (GUICtrlRead($hgParameters) <> "Please enter the parameters")) Then If $bActRecCtrl = True Then GUICtrlSetState($hgRecordInstallation, $GUI_UNCHECKED + $GUI_DISABLE + $GUI_SHOW) $bActRecCtrl = False EndIf ElseIf $bActRecCtrl = False Then GUICtrlSetState($hgRecordInstallation, $iSVCheckBoxState - $GUI_DISABLE + $GUI_ENABLE) $bActRecCtrl = True EndIf #ce WEnd ;------------------------------------------------------------------------------------------------------------------------------------ ; Functions and Subroutines start here ;------------------------------------------------------------------------------------------------------------------------------------ Func CloseButton() ;function set to the close button of the gui, logs the message and exits ;LogMsg("User Cancelled.") Exit EndFunc Func StartBuild() #cs Local $isOpenAccess64 = True Local $isOpenAccess32 = True Local $isERwinDM64 = True Local $isERwinDM32 = True Local $isNavigator64 = True Local $isNavigator32 = True Local $isMartServer64 = True Local $isMartServer32 = True #ce if not IsChecked($Checkbox1) then $isERwinDM64 = False if not IsChecked($Checkbox2) then $isNavigator64 = False if not IsChecked($Checkbox3) then $isMartServer64 = False if not IsChecked($Checkbox4) then $isERwinDM32 = False if not IsChecked($Checkbox5) then $isNavigator32 = False if not IsChecked($Checkbox6) then $isMartServer32 = False if (IsChecked($Checkbox1) or IsChecked($Checkbox2)) Then $isOpenAccess64 = True Else $isOpenAccess64 = False EndIf if (IsChecked($Checkbox4) or IsChecked($Checkbox5)) Then $isOpenAccess32 = True Else $isOpenAccess32 = False EndIf MsgBox(0,"","IsOpenAccess32 and 64 : $isOpenAccess32$ and $isOpenAccess64$") Build64() Build32() EndFunc Func IsChecked($control) Return BitAnd(GUICtrlRead($control),$GUI_CHECKED) = $GUI_CHECKED EndFunc