#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.0.0
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
#include <GuiEdit.au3>
#include <Screencapture.au3>
#include <file.au3>
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
Opt("GUIOnEventMode", 1)
Global $Formtitle = " Installation Testing", $Ver = '1.0'
Global $boxleft = 30
Local $Form, $box1, $msg, $button1, $box2, $box3, $ch
$ch = 0
If FileExists($Ini_Path) Then
;====
Dim $var[10]
$var = IniReadSectionNames(@DesktopDir & "\Installation.ini")
If @error Then
MsgBox(4096, "", "Error occurred, probably no INI file.")
Else
$a = $var[0]
For $i = 2 To $a
If $var[$i] <= 7 Then
$ch = "Radio" & $var[$i]
IniRenameSection(@DesktopDir & "\Installation.ini", $var[$i], "8")
Call($ch)
EndIf
Next
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName)
;~ FileDelete($Ini_Path)
FileDelete(@DesktopDir & "\Setup.ini")
EndIf
;====
;~ For $icounter = 1 To 7 Step 1
;~ $Ini_Read_Section = IniRead($Ini_Path, $icounter, "key", "")
;~ If $Ini_Read_Section <> "" And $Ini_Read_Section <= 7 Then
;~ $ch = "Radio" & $Ini_Read_Section
;~ EndIf
;~ Next
EndIf
$Form1_1 = GUICreate("", 421, 387, 193, 125, $WS_POPUP)
GUISetFont(10, 800, 0, "MS Sans Serif")
GUISetBkColor(0xD8E4F8)
GUICtrlCreateLabel($Formtitle, 120, 10, 500, 33)
$Radio2 = GUICtrlCreateCheckbox(" ", 80, 88, 33, 49)
GUICtrlSetCursor(-1, 0)
$Radio3 = GUICtrlCreateCheckbox(" ", 80, 128, 33, 49)
GUICtrlSetCursor(-1, 0)
$Radio4 = GUICtrlCreateCheckbox(" ", 80, 168, 33, 49)
GUICtrlSetCursor(-1, 0)
$Radio5 = GUICtrlCreateCheckbox(" ", 80, 208, 33, 49)
GUICtrlSetCursor(-1, 0)
$button1 = GUICtrlCreateButton("Browse", 140, 58, 150, 33, 0)
GUICtrlSetBkColor(-1, 0xFFFF00)
GUICtrlSetCursor(-1, 0)
$Button2 = GUICtrlCreateButton("1Install", 128, 98, 200, 25, 0)
$Button3 = GUICtrlCreateButton("2 Install)", 128, 138, 200, 25, 0)
$Button4 = GUICtrlCreateButton("3 Install", 128, 182, 200, 25, 0)
$Button5 = GUICtrlCreateButton("Full CD Re -Installation", 128, 224, 200, 25, 0)
$Radio6 = GUICtrlCreateCheckbox(" ", 80, 248, 33, 49)
GUICtrlSetCursor(-1, 0)
$Button6 = GUICtrlCreateButton("Uninstallation", 128, 264, 200, 25, 0)
$Button7 = GUICtrlCreateButton("Start", 140, 304, 150, 33, 0);left, top , width , height
GUICtrlSetBkColor(-1, 0xFFFF00)
GUICtrlSetCursor(-1, 0)
$Group1 = GUICtrlCreateGroup("", 48, 40, 337, 257)
$label0 = GUICtrlCreateLabel("X", 410, 0, 50, 50)
GUICtrlSetCursor(-1, 0)
GUICtrlCreateLabel("Version :" & $Ver, 320, 370, 95, 15)
GUICtrlSetState(-1, 128)
GUICtrlCreateLabel("", 0, 0, 421, 387, $WS_CLIPCHILDREN, $GUI_WS_EX_PARENTDRAG)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUISetState(@SW_SHOW)
GUISetOnEvent($label0, "Radio0")
GUICtrlSetOnEvent($label0, "Radio0")
GUICtrlSetOnEvent($button1, "Radio1");_
GUICtrlSetOnEvent($Button2, "Radio2");
GUICtrlSetOnEvent($Button3, "Radio3");
GUICtrlSetOnEvent($Button4, "Radio4");
GUICtrlSetOnEvent($Button5, "Radio5");Full CD Re -Installation
GUICtrlSetOnEvent($Button6, "Radio6");Uninstallation
GUICtrlSetOnEvent($Button7, "Radio7");Start
While 1
$msg = GUIGetMsg()
Select
Case $msg = -3
Radio0()
Case $msg = $button1
Radio1()
Case $msg = $Button2
Radio2()
Case $msg = $Button3
Radio3()
Case $msg = $Button4
Radio4()
Case $msg = $Button5
Radio5()
Case $msg = $Button6
Radio6()
Case $msg = $Button7
Radio7()
EndSelect
WEnd
func Radio0()
endfunc
func Radio1()
endfunc
func Radio2()
endfunc
func Radio3()
endfunc
func Radio4()
endfunc
func Radio5()
endfunc
func Radio6()
endfunc
func Radio7()
endfunc |