Jump to content

Graphical AutoIt Debugger


Stumpii
 Share

Recommended Posts

Hi Mr. Stumpii,

I love your debugger. I'm having a little trouble running a script in the debugger ver. 0.31.0.0 in Win7 64bit.

The error I am getting immediately when I Step Into the first line is:

Line 354 (File "C:\Dnload\9xAddons\Debug\TweakUiPoertoyWin7.DebugScript.au3

Func AutoIt_Debugger_OnAutoItExit()

Error: Duplicate function name

The script I am using is:

Sleep(100)
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
Opt("SendKeyDelay", 5)
AutoItSetOption("TrayIconDebug", 1) ;0-off
; Set so that tray displays current line number

; Include User.INI Info
#include "IniRead.au3"
$Var1 = "C:\Dnload\9xAddons\Ultimate Windows Tweaker v 2.1.zip"
If _OSVersion() = "Win7" Or "Win7X64" Then
    $ProgramFiles = "C:\Programs\"
    $Win7 = "7"
Else
    $ProgramFiles = "C:\Program Files\"
EndIf
RunWait(@Comspec & ' /c C:\Dnload\9xAddons\UnZip.bat "' & $Var1 & '" & "' & $Win7 & '"')
DirCopy("C:\Scratch99\uwtv2.1",$ProgramFiles &  "TweakUIWin7", 1)
FileDelete($ProgramFiles &  "TweakUIWin7\" & "Change log.txt")
Run($ProgramFiles & 'TweakUIWin7\Ultimate Windows Tweaker.exe')
; Remove Scratch99 directory
RunWait(@Comspec & " /c C:\Dnload\9xAddons\RDScratch99.bat ")
While 1 <> 1

Run("C:\Dnload\9xAddons\TweakUiPowertoy XP sp1sp2.exe")
WinWait("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
If Not WinActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ") Then WinActivate("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
WinWaitActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
Send("{ENTER}")
Sleep(15)
msgbox (48, "After Run", "1")
WinWait("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
If Not WinActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ") Then WinActivate("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
WinWaitActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")

Send("{TAB}{UP}{TAB}{TAB}{TAB}{ENTER}")
Sleep(15)
msgbox (48, "After Run", "2")
Send("{ENTER}")

; Install complete

; Setup Auto Login

; Wend
Sleep(300)
Run('C:\WINDOWS\system32\TweakUI.exe')
WinWait("Tweak UI","Tweak UI for Windows")
If Not WinActive("Tweak UI","Tweak UI for Windows") Then WinActivate("Tweak UI","Tweak UI for Windows")
WinWaitActive("Tweak UI","Tweak UI for Windows")
Send("{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RIGHT}{DOWN}")
WinWait("Tweak UI","&Log on automaticall")
If Not WinActive("Tweak UI","&Log on automaticall") Then WinActivate("Tweak UI","&Log on automaticall")
WinWaitActive("Tweak UI","&Log on automaticall")
Send("{TAB}{SPACE}{TAB}{TAB}{ENTER}")
WinWait("Set Autologon Password","Enter the password t")
If Not WinActive("Set Autologon Password","Enter the password t") Then WinActivate("Set Autologon Password","Enter the password t")
WinWaitActive("Set Autologon Password","Enter the password t")
Send("{TAB}{TAB}{ENTER}")
WinWait("Tweak UI","&Log on automaticall")
If Not WinActive("Tweak UI","&Log on automaticall") Then WinActivate("Tweak UI","&Log on automaticall")
WinWaitActive("Tweak UI","&Log on automaticall")
Send("{ENTER}")
WinWait("Set Autologon Password","Enter the password t")
If Not WinActive("Set Autologon Password","Enter the password t") Then WinActivate("Set Autologon Password","Enter the password t")
WinWaitActive("Set Autologon Password","Enter the password t")
Send($Password)
Send("{TAB}")
Send($Password)
Send("{TAB}{ENTER}")
WinWait("Tweak UI","&Log on automaticall")
If Not WinActive("Tweak UI","&Log on automaticall") Then WinActivate("Tweak UI","&Log on automaticall")
WinWaitActive("Tweak UI","&Log on automaticall")
Send("{TAB}{ENTER}")
WEnd
Exit
Func _OSVersion()
    Local $OS_Version, $servicepack_version
    $OS_Version = StringStripWS(StringRegExpReplace(@OSVersion, "(WIN_)|(Microsoft )|(Windows )|(\(TM\))|( Ultimate)", ""), 8)
    $OS_Version = StringRegExpReplace(StringRegExpReplace($OS_Version, '2008', 'Win7'), 'VISTA', 'Vista')
    If RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", 'CurrentBuildNumber') > 7000 Then $OS_Version = 'Win7'
    $servicepack_version = StringReplace(@OSServicePack, "Service Pack ", "SP")
    If @error = -1 Then $servicepack_version = ""

    ConsoleWrite($OS_Version & $servicepack_version & StringRegExpReplace(@OSArch, '(X86)', '') & @CRLF)
    Return $OS_Version & $servicepack_version & StringRegExpReplace(@OSArch, '(X86)', '')
EndFunc   ;==>_OSVersion

The debugger creates a file that looks like this:

#Include <winapi.au3>
#Include <GUIConstants.au3>
#Include <WindowsConstants.au3>
Global $AutoItDebugger_Paused = 0
Global $AutoItDebugger_Quit = 0
Global $AutoItDebuggerCommandWindowName = ""
Global $AutoItDebuggerCommandWindow
Global $AutoItDebuggerCommandWindowListbox
AutoItSetOption("OnExitFunc","AutoIt_Debugger_OnAutoItExit")
AutoIt_Debugger_CreateMessageWindow()
$TempOriginalFileBeingDebuggedFileName = "TweakUiPowertoy Win7.au3"
$TempOriginalFileBeingDebuggedFileFolder = "C:\Dnload\9xAddons"
$TempOriginalFileBeingDebuggedFilePath = "C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3"
AutoIt_Debugger_LoadFile("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3")
AutoIt_Debugger_DebugFile(@ScriptFullPath)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 1, False, @error, @extended)
Sleep(100)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 1, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 2, False, @error, @extended)
Opt("WinWaitDelay",100)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 2, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 3, False, @error, @extended)
Opt("WinTitleMatchMode",4)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 3, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 4, False, @error, @extended)
Opt("WinDetectHiddenText",1)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 4, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 5, False, @error, @extended)
Opt("MouseCoordMode",0)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 5, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 6, False, @error, @extended)
Opt("SendKeyDelay", 5)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 6, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 7, False, @error, @extended)
AutoItSetOption("TrayIconDebug", 1) ;0-off
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 7, False, @error, @extended)
; Set so that tray displays current line number

; Include User.INI Info

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 11, False, @error, @extended)
#Include "C:\Dnload\9xAddons\Debug\IniRead.Debug Script.au3"
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 11, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 12, False, @error, @extended)
$Var1 = "C:\Dnload\9xAddons\Ultimate Windows Tweaker v 2.1.zip"
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 12, False, @error, @extended)
AutoIt_Debugger_SendVariable("$Var1", $Var1, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 13, False, @error, @extended)
If _OSVersion() = "Win7" Or "Win7X64" Then
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 13, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 14, False, @error, @extended)
    $ProgramFiles = "C:\Programs\"
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 14, False, @error, @extended)
AutoIt_Debugger_SendVariable("$ProgramFiles", $ProgramFiles, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 15, False, @error, @extended)
    $Win7 = "7"
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 15, False, @error, @extended)
AutoIt_Debugger_SendVariable("$Win7", $Win7, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 16, False, @error, @extended)
Else
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 16, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 17, False, @error, @extended)
    $ProgramFiles = "C:\Program Files\"
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 17, False, @error, @extended)
AutoIt_Debugger_SendVariable("$ProgramFiles", $ProgramFiles, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 18, False, @error, @extended)
EndIf
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 18, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 19, False, @error, @extended)
RunWait(@Comspec & ' /c C:\Dnload\9xAddons\UnZip.bat "' & $Var1 & '" & "' & $Win7 & '"')
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 19, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 20, False, @error, @extended)
DirCopy("C:\Scratch99\uwtv2.1",$ProgramFiles &  "TweakUIWin7", 1)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 20, False, @error, @extended)
AutoIt_Debugger_SendVariable("$ProgramFiles", $ProgramFiles, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 21, False, @error, @extended)
FileDelete($ProgramFiles &  "TweakUIWin7\" & "Change log.txt")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 21, False, @error, @extended)
AutoIt_Debugger_SendVariable("$ProgramFiles", $ProgramFiles, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 22, False, @error, @extended)
Run($ProgramFiles & 'TweakUIWin7\Ultimate Windows Tweaker.exe')
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 22, False, @error, @extended)
AutoIt_Debugger_SendVariable("$ProgramFiles", $ProgramFiles, @error, @extended)
; Remove Scratch99 directory

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 24, False, @error, @extended)
RunWait(@Comspec & " /c C:\Dnload\9xAddons\RDScratch99.bat ")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 24, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 25, False, @error, @extended)
While 1 <> 1
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 25, False, @error, @extended)


AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 27, False, @error, @extended)
Run("C:\Dnload\9xAddons\TweakUiPowertoy XP sp1sp2.exe")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 27, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 28, False, @error, @extended)
WinWait("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 28, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 29, False, @error, @extended)
If Not WinActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ") Then WinActivate("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 29, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 30, False, @error, @extended)
WinWaitActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 30, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 31, False, @error, @extended)
Send("{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 31, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 32, False, @error, @extended)
Sleep(15)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 32, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 33, False, @error, @extended)
msgbox (48, "After Run", "1")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 33, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 34, False, @error, @extended)
WinWait("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 34, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 35, False, @error, @extended)
If Not WinActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ") Then WinActivate("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 35, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 36, False, @error, @extended)
WinWaitActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 36, False, @error, @extended)


AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 38, False, @error, @extended)
Send("{TAB}{UP}{TAB}{TAB}{TAB}{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 38, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 39, False, @error, @extended)
Sleep(15)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 39, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 40, False, @error, @extended)
msgbox (48, "After Run", "2")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 40, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 41, False, @error, @extended)
Send("{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 41, False, @error, @extended)

; Install complete

; Setup Auto Login

; Wend

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 48, False, @error, @extended)
Sleep(300)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 48, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 49, False, @error, @extended)
Run('C:\WINDOWS\system32\TweakUI.exe')
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 49, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 50, False, @error, @extended)
WinWait("Tweak UI","Tweak UI for Windows")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 50, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 51, False, @error, @extended)
If Not WinActive("Tweak UI","Tweak UI for Windows") Then WinActivate("Tweak UI","Tweak UI for Windows")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 51, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 52, False, @error, @extended)
WinWaitActive("Tweak UI","Tweak UI for Windows")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 52, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 53, False, @error, @extended)
Send("{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RIGHT}{DOWN}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 53, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 54, False, @error, @extended)
WinWait("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 54, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 55, False, @error, @extended)
If Not WinActive("Tweak UI","&Log on automaticall") Then WinActivate("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 55, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 56, False, @error, @extended)
WinWaitActive("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 56, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 57, False, @error, @extended)
Send("{TAB}{SPACE}{TAB}{TAB}{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 57, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 58, False, @error, @extended)
WinWait("Set Autologon Password","Enter the password t")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 58, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 59, False, @error, @extended)
If Not WinActive("Set Autologon Password","Enter the password t") Then WinActivate("Set Autologon Password","Enter the password t")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 59, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 60, False, @error, @extended)
WinWaitActive("Set Autologon Password","Enter the password t")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 60, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 61, False, @error, @extended)
Send("{TAB}{TAB}{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 61, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 62, False, @error, @extended)
WinWait("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 62, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 63, False, @error, @extended)
If Not WinActive("Tweak UI","&Log on automaticall") Then WinActivate("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 63, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 64, False, @error, @extended)
WinWaitActive("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 64, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 65, False, @error, @extended)
Send("{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 65, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 66, False, @error, @extended)
WinWait("Set Autologon Password","Enter the password t")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 66, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 67, False, @error, @extended)
If Not WinActive("Set Autologon Password","Enter the password t") Then WinActivate("Set Autologon Password","Enter the password t")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 67, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 68, False, @error, @extended)
WinWaitActive("Set Autologon Password","Enter the password t")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 68, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 69, False, @error, @extended)
Send($Password)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 69, False, @error, @extended)
AutoIt_Debugger_SendVariable("$Password", $Password, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 70, False, @error, @extended)
Send("{TAB}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 70, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 71, False, @error, @extended)
Send($Password)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 71, False, @error, @extended)
AutoIt_Debugger_SendVariable("$Password", $Password, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 72, False, @error, @extended)
Send("{TAB}{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 72, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 73, False, @error, @extended)
WinWait("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 73, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 74, False, @error, @extended)
If Not WinActive("Tweak UI","&Log on automaticall") Then WinActivate("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 74, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 75, False, @error, @extended)
WinWaitActive("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 75, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 76, False, @error, @extended)
Send("{TAB}{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 76, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 77, False, @error, @extended)
WEnd
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 77, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 78, False, @error, @extended)
Exit
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 78, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 79, False, @error, @extended)
Func _OSVersion()
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 79, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 80, False, @error, @extended)
    Local $OS_Version, $servicepack_version
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 80, False, @error, @extended)
AutoIt_Debugger_SendVariable("$OS_Version", $OS_Version, @error, @extended)
AutoIt_Debugger_SendVariable("$servicepack_version", $servicepack_version, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 81, False, @error, @extended)
    $OS_Version = StringStripWS(StringRegExpReplace(@OSVersion, "(WIN_)|(Microsoft )|(Windows )|(\(TM\))|( Ultimate)", ""), 8)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 81, False, @error, @extended)
AutoIt_Debugger_SendVariable("$OS_Version", $OS_Version, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 82, False, @error, @extended)
    $OS_Version = StringRegExpReplace(StringRegExpReplace($OS_Version, '2008', 'Win7'), 'VISTA', 'Vista')
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 82, False, @error, @extended)
AutoIt_Debugger_SendVariable("$OS_Version", $OS_Version, @error, @extended)
AutoIt_Debugger_SendVariable("$OS_Version", $OS_Version, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 83, False, @error, @extended)
    If RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", 'CurrentBuildNumber') > 7000 Then $OS_Version = 'Win7'
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 83, False, @error, @extended)
AutoIt_Debugger_SendVariable("$OS_Version", $OS_Version, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 84, False, @error, @extended)
    $servicepack_version = StringReplace(@OSServicePack, "Service Pack ", "SP")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 84, False, @error, @extended)
AutoIt_Debugger_SendVariable("$servicepack_version", $servicepack_version, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 85, False, @error, @extended)
    If @error = -1 Then $servicepack_version = ""
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 85, False, @error, @extended)
AutoIt_Debugger_SendVariable("$servicepack_version", $servicepack_version, @error, @extended)


AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 87, False, @error, @extended)
    ConsoleWrite($OS_Version & $servicepack_version & StringRegExpReplace(@OSArch, '(X86)', '') & @CRLF)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 87, False, @error, @extended)
AutoIt_Debugger_SendVariable("$OS_Version", $OS_Version, @error, @extended)
AutoIt_Debugger_SendVariable("$servicepack_version", $servicepack_version, @error, @extended)
    AutoIt_Debugger_SendConsoleWrite($OS_Version & $servicepack_version & StringRegExpReplace(@OSArch, '(X86)', '') & @CRLF, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 88, False, @error, @extended)
    Return $OS_Version & $servicepack_version & StringRegExpReplace(@OSArch, '(X86)', '')
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 88, False, @error, @extended)
AutoIt_Debugger_SendVariable("$OS_Version", $OS_Version, @error, @extended)
AutoIt_Debugger_SendVariable("$servicepack_version", $servicepack_version, @error, @extended)
EndFunc   ;==>_OSVersion


Func AutoIt_Debugger_OnAutoItExit()
    AutoIt_Debugger_WaitForExit()
EndFunc

Func CheckForVariableChange($VariableName, $AutoItDebugger_ArrayIndexString,  $VariableValue)
    If $VariableName = "$Var1" Then
        AutoIt_Debugger_GetVariableFromEvent("$Var1", $Var1, $AutoItDebugger_ArrayIndexString,  $VariableValue)
    EndIf
    If $VariableName = "$ProgramFiles" Then
        AutoIt_Debugger_GetVariableFromEvent("$ProgramFiles", $ProgramFiles, $AutoItDebugger_ArrayIndexString,  $VariableValue)
    EndIf
    If $VariableName = "$Win7" Then
        AutoIt_Debugger_GetVariableFromEvent("$Win7", $Win7, $AutoItDebugger_ArrayIndexString,  $VariableValue)
    EndIf
    If $VariableName = "$Password" Then
        AutoIt_Debugger_GetVariableFromEvent("$Password", $Password, $AutoItDebugger_ArrayIndexString,  $VariableValue)
    EndIf
    If $VariableName = "$OS_Version" Then
        AutoIt_Debugger_GetVariableFromEvent("$OS_Version", $OS_Version, $AutoItDebugger_ArrayIndexString,  $VariableValue)
    EndIf
    If $VariableName = "$servicepack_version" Then
        AutoIt_Debugger_GetVariableFromEvent("$servicepack_version", $servicepack_version, $AutoItDebugger_ArrayIndexString,  $VariableValue)
    EndIf
EndFunc

#cs ----------------------------------------------------------------------------
    
    AutoIt Version: 3.2.1.11 (beta)
    Author:         myName
    
    Script Function:
    The command code for the AutoIt Debugger (this was the Include file)
    
#ce ----------------------------------------------------------------------------

;Uncomment the following to check that all variables are defined
;AutoItSetOption("MustDeclareVars", 1)

Func AutoIt_Debugger_CreateMessageWindow()
    ;#Include <winapi.au3>
    ;#include <GUIConstants.au3>
    ;;#Include <Date.au3>
    ;;#include <GUIConstantsEx.au3>
    ;;#include <WindowsConstants.au3>
    ;#include-once

    #Region ### START Koda GUI section ### Form=_AutoIt Debugger Include.kxf
    $AutoItDebuggerCommandWindow = GUICreate("AutoIt Debugger Command Window", 621, 328, 193, 126)
    $AutoItDebuggerCommandWindowListbox = GUICtrlCreateList("", 8, 8, 609, 305)
    #EndRegion ### END Koda GUI section ###
    ;GUISetState(@SW_SHOW)

    ; Register Windows Messages
    GUIRegisterMsg($WM_COPYDATA, "_GUIRegisterMsgProc")

    ;Dim $AutoItDebugger_ClosedByUser
    ;Dim $AutoItDebugger_LastError
    ;Dim $AutoItDebugger_LastExtended
EndFunc   ;==>AutoIt_Debugger_CreateMessageWindow


Func AutoItDebuggerEvent_ChangeVariable($VariableName, $VariableValue)
    ;MsgBox(0, "_AutoIt Debugger Include", "Entered 'AutoItDebuggerEvent_ChangeVariable'")
    
    Dim $AutoItDebugger_ArrayIndexString = ""
    Dim $StrippedVariableName = $VariableName
    
    ;Convert array variables from $asMyArray[1] format to a
    Local $iOpenSquareBracketPos
    $iOpenSquareBracketPos = StringInStr($VariableName, "[")
    If $iOpenSquareBracketPos <> 0 Then
        $StrippedVariableName = StringLeft($VariableName, $iOpenSquareBracketPos - 1)
        ;Strip the variable name and open bracket to leave '1][1]' etc.
        $AutoItDebugger_ArrayIndexString = StringTrimLeft($VariableName, $iOpenSquareBracketPos)
        ;Strip the close bracket to leave '1][1' etc.
        $AutoItDebugger_ArrayIndexString = StringTrimRight($AutoItDebugger_ArrayIndexString, 1)
        ;Remove any ][ from the string and replace with | to make 1][1 into 1|1
        $AutoItDebugger_ArrayIndexString = StringReplace($AutoItDebugger_ArrayIndexString, "][", "|")
        ;MsgBox(0, "_AutoIt Debugger Include", $AutoItDebugger_ArrayIndexString)
    EndIf
    
    ;Check if the variable is actually a variable
    If IsDeclared(StringTrimLeft($VariableName, 1)) Then
        CheckForVariableChange ($StrippedVariableName, $AutoItDebugger_ArrayIndexString, $VariableValue)
    Else
        ;MsgBox features: Title=Yes, Text=Yes, Buttons=OK, Icon=Warning
        MsgBox(48, "_AutoIt Debugger Include", "AutoIt Debugger GUI sent attempted to change the value of an undeclared variable (" & $StrippedVariableName & ")")
    EndIf
EndFunc   ;==>AutoItDebuggerEvent_ChangeVariable


Func AutoIt_Debugger_NextLine($Filepath, $Filename, $LineNumber, $SkipLine, $NextLine_Error, $NextLine_Extended)
    Local $sChangedVariableName
    
    ;Default to single step
    $AutoItDebugger_Paused = 1
    
    ;Send new line status to the Debug GUI
    _AU3COM_SendData_NewLine($Filepath & "|" & $Filename & "|" & $LineNumber & "|" & $SkipLine)


    ;Wait for the GUI to come off pause
    While $AutoItDebugger_Paused
        ;Quit if necessary
        If $AutoItDebugger_Quit Then
            Exit
        EndIf
        
        ;Wait
        Sleep(50)
    WEnd
    
    ;Set error codes for the rest of the program
    SetError($NextLine_Error, $NextLine_Extended)
EndFunc   ;==>AutoIt_Debugger_NextLine


Func AutoIt_Debugger_FinishedLine($Filepath, $Filename, $LineNumber, $SkipLine, $NextLine_Error, $NextLine_Extended)
    
    ;If Not $SkipLine Then
    ;Send new line status to the Debug GUI
    _AU3COM_SendData_FinishedLine($Filepath & "|" & $Filename & "|" & $LineNumber & "|" & $SkipLine)

    ;Send the @error and @extended data on each new line
    _AU3COM_SendData_SendVariable("@error" & "|" & $NextLine_Error)
    _AU3COM_SendData_SendVariable("@extended" & "|" & $NextLine_Extended)
    ;EndIf

    ;Set error codes for the rest of the program
    SetError($NextLine_Error, $NextLine_Extended)
EndFunc   ;==>AutoIt_Debugger_FinishedLine


Func AutoIt_Debugger_WaitForExit()
    ;Send script finished message
    _AU3COM_SendData_ScriptFinished("ScriptFinished")
EndFunc   ;==>AutoIt_Debugger_WaitForExit


Func AutoIt_Debugger_LoadFile($ORiginalScriptFilePath, $ORiginalScriptFileName)
    If $AutoItDebuggerCommandWindowName = "" Then
        ;Take the first script name as the command window name
        $AutoItDebuggerCommandWindowName = $ORiginalScriptFilePath

        ;Change this windows name
        WinSetTitle("AutoIt Debugger Command Window", "", $AutoItDebuggerCommandWindowName & " AutoIt Debugger Command Window")
    EndIf
    
    ;Default to single step
    $AutoItDebugger_Paused = 1

    _AU3COM_SendData_LoadFile($ORiginalScriptFilePath & "|" & $ORiginalScriptFileName)

    ;Wait for the GUI to come off pause
    While $AutoItDebugger_Paused
        ;Quit if necessary
        If $AutoItDebugger_Quit Then
            Exit
        EndIf
        
        ;Wait
        Sleep(50)
    WEnd
EndFunc   ;==>AutoIt_Debugger_LoadFile


Func AutoIt_Debugger_DebugFile($DebugScriptFilePath)
    ;Default to single step
    $AutoItDebugger_Paused = 1

    _AU3COM_SendData_DebugFile($DebugScriptFilePath)

    ;Wait for the GUI to come off pause
    While $AutoItDebugger_Paused
        ;Quit if necessary
        If $AutoItDebugger_Quit Then
            Exit
        EndIf
        
        ;Wait
        Sleep(50)
    WEnd
EndFunc   ;==>AutoIt_Debugger_DebugFile


Func AutoIt_Debugger_SendVariable($VariableName, $VariableValue, $SendVariable_Error, $SendVariable_Extended)
    Local $iNumberOfDims
    Local $iDimXIndex
    Local $iDimYIndex
    Local $iDimZIndex
    
    If IsArray($VariableValue) Then
        ;Find the number of dimensions
        $iNumberOfDims = UBound($VariableValue, 0)
        Select
            Case $iNumberOfDims = 1
                ;Send each array index seperatly
                For $iDimXIndex = 0 To UBound($VariableValue, 1) - 1
                    ;$oDebug.SendVariable ($VariableName & "[" & $iDimXIndex & "]", AutoIt_Debugger_ReturnVariableValue($VariableName, $VariableValue[$iDimXIndex]))
                    _AU3COM_SendData_SendVariable($VariableName & "[" & $iDimXIndex & "]" & "|" & AutoIt_Debugger_ReturnVariableValue($VariableName, $VariableValue[$iDimXIndex]))
                Next
                
            Case $iNumberOfDims = 2
                ;Repeat for each X dimension
                For $iDimXIndex = 0 To UBound($VariableValue, 1) - 1
                    ;Repeat for each Y dimension
                    For $iDimYIndex = 0 To UBound($VariableValue, 2) - 1
                        ;$oDebug.SendVariable ($VariableName & "[" & $iDimXIndex & "][" & $iDimYIndex & "]", AutoIt_Debugger_ReturnVariableValue($VariableName, $VariableValue[$iDimXIndex][$iDimYIndex]))
                        _AU3COM_SendData_SendVariable($VariableName & "[" & $iDimXIndex & "][" & $iDimYIndex & "]" & "|" & AutoIt_Debugger_ReturnVariableValue($VariableName, $VariableValue[$iDimXIndex][$iDimYIndex]))
                    Next
                Next
                
            Case $iNumberOfDims = 3
                ;Repeat for each X dimension
                For $iDimXIndex = 0 To UBound($VariableValue, 1) - 1
                    ;Repeat for each Y dimension
                    For $iDimYIndex = 0 To UBound($VariableValue, 2) - 1
                        ;Repeat for each Z dimension
                        For $iDimZIndex = 0 To UBound($VariableValue, 3) - 1
                            ;$oDebug.SendVariable ($VariableName & "[" & $iDimXIndex & "][" & $iDimYIndex & "][" & $iDimZIndex & "]", AutoIt_Debugger_ReturnVariableValue($VariableName, $VariableValue[$iDimXIndex][$iDimYIndex][$iDimZIndex]))
                            _AU3COM_SendData_SendVariable($VariableName & "[" & $iDimXIndex & "][" & $iDimYIndex & "][" & $iDimZIndex & "]" & "|" & AutoIt_Debugger_ReturnVariableValue($VariableName, $VariableValue[$iDimXIndex][$iDimYIndex][$iDimZIndex]))
                        Next
                    Next
                Next
                
            Case Else
                ;$oDebug.SendVariable ($VariableName, "<Array has too many dims>")
                _AU3COM_SendData_SendVariable($VariableName & "|" & "<Array has too many dims>")
        EndSelect
    Else
        ;$oDebug.SendVariable ($VariableName, AutoIt_Debugger_ReturnVariableValue($VariableValue))
        _AU3COM_SendData_SendVariable($VariableName & "|" & AutoIt_Debugger_ReturnVariableValue($VariableName, $VariableValue))
    EndIf

    ;Set error codes for the rest of the program
    SetError($SendVariable_Error, $SendVariable_Extended)
EndFunc   ;==>AutoIt_Debugger_SendVariable


Func AutoIt_Debugger_SendConsoleWrite($OutputString, $SendVariable_Error, $SendVariable_Extended)

    _AU3COM_SendData_ConsoleWrite($OutputString)

    ;Set error codes for the rest of the program
    SetError($SendVariable_Error, $SendVariable_Extended)
EndFunc   ;==>AutoIt_Debugger_SendVariable


Func AutoIt_Debugger_ReturnVariableValue($AutoIt_Debugger_VariableName, $AutoIt_Debugger_VariableValue)
    Local $AutoIt_Debugger_sRes = ""
    ;$AutoIt_Debugger_VariableValue = Execute($AutoIt_Debugger_VariableName)
    If IsBool($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= $AutoIt_Debugger_VariableValue
    If IsFloat($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= $AutoIt_Debugger_VariableValue
    If IsInt($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes&= $AutoIt_Debugger_VariableValue
    ;If IsNumber($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= $AutoIt_Debugger_VariableValue
    If IsString($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= $AutoIt_Debugger_VariableValue
    If IsArray($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= $AutoIt_Debugger_VariableValue
    If IsObj($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes&= "<Object>" & $AutoIt_Debugger_VariableValue
    If IsBinary($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= "<Binary>" & $AutoIt_Debugger_VariableValue
    If IsHWnd($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= "<HWnd>" & $AutoIt_Debugger_VariableValue
    If IsKeyword($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= "<Keyword>" & $AutoIt_Debugger_VariableValue
    If IsDllStruct($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= "<DllStructure>" & $AutoIt_Debugger_VariableValue
    
    If StringLeft($AutoIt_Debugger_VariableName, 1) <> "$" Then $AutoIt_Debugger_VariableName = "$" & $AutoIt_Debugger_VariableName
    If Not IsDeclared(StringTrimLeft($AutoIt_Debugger_VariableName, 1)) Then $AutoIt_Debugger_sRes &= "<Undeclared>"

    Return $AutoIt_Debugger_sRes
EndFunc   ;==>AutoIt_Debugger_ReturnVariableValue


Func AutoIt_Debugger_GetVariableFromEvent($VariableName, ByRef $Variable, $AutoItDebugger_ArrayIndexString, $VariableValue)
    ;MsgBox(0, "_AutoIt Debugger Include", "Entered 'AutoIt_Debugger_GetVariableFromEvent'")

    Local $iNumberOfDims
    Local $iDimXIndex
    Local $iDimYIndex
    Local $iDimZIndex
    Local $ArrayIndexArray
    
    If IsBool($Variable) Or IsFloat($Variable) Or IsInt($Variable) Or IsNumber($Variable) Or IsString($Variable) Then
        $Variable = $VariableValue
        ;MsgBox(0, "_AutoIt Debugger Include", "New value of '" & $VariableName & " is '" & $Variable & "'")
    ElseIf IsArray($Variable) Then
        ;Extract the array section, split by |s
        $ArrayIndexArray = StringSplit($AutoItDebugger_ArrayIndexString, "|")

        ;Find the number of dimensions
        $iNumberOfDims = $ArrayIndexArray[0]
        Select
            Case $iNumberOfDims = 1
                ;Set the value based on the array index
                $Variable[$ArrayIndexArray[1]] = $VariableValue
                
            Case $iNumberOfDims = 2
                ;Set the value based on the array index
                $Variable[$ArrayIndexArray[1]][$ArrayIndexArray[2]] = $VariableValue
                
            Case $iNumberOfDims = 3
                ;Set the value based on the array index
                $Variable[$ArrayIndexArray[1]][$ArrayIndexArray[2]][$ArrayIndexArray[3]] = $VariableValue
                
            Case Else
                ;Do nothing
        EndSelect
        
    ElseIf IsObj($Variable) Then
        ;Do nothing
    ElseIf IsBinary ($Variable) Then
        ;Do nothing
    ElseIf IsHWnd($Variable) Then
        ;Do nothing
    ElseIf IsKeyword($Variable) Then
        ;Do nothing
    EndIf
EndFunc   ;==>AutoIt_Debugger_GetVariableFromEvent


; Message Handler
Func _GUIRegisterMsgProc($hWnd, $MsgID, $WParam, $LParam)
    If $MsgID = $WM_COPYDATA Then
        
        ; $LParam = Poiter to a COPYDATA Struct
        Local $STRUCTDEF_AU3MESSAGE = "char var1[256]"
        Local $STRUCTDEF_AU3MESSAGELEN = "dword var1"
        Local $StructDef_COPYDATA = "dword var1;dword var2;ptr var3"
        
        ;Set a reference to the COPYDATA structure
        Local $vs_cds = DllStructCreate($StructDef_COPYDATA, $LParam)
        ;Extract the command (the 1st element)
        Local $msgType = DllStructGetData($vs_cds, 1)
        
        ;MsgBox(0, "AutoIt Debugger", "Command Received: " & $msgType)

        Select
            Case $msgType = 0

                ;Log message
                ;GUICtrlSetData($AutoItDebuggerCommandWindowListbox,_Now() & ": New variable")

                ;Get the message length from the 2nd element
                Local $msglen1 = DllStructGetData($vs_cds, 2)
                Local $STRUCTDEF_AU3MESSAGE1 = "char var1[" & $msglen1 & "]"
                Local $vs_msg1 = DllStructCreate($STRUCTDEF_AU3MESSAGE1, DllStructGetData($vs_cds, 3))
                
                ;Display what we have recived
                Local $MSGRECVD = DllStructGetData($vs_msg1, 1)
                ;MsgBox(0, "Recver - Test String", $MSGRECVD)

                Local $iSpacePos
                $iSpacePos = StringInStr($MSGRECVD, " ")
                Dim $sChangedVariableName = StringLeft($MSGRECVD, $iSpacePos - 1)
                Dim $sChangedVariableValue = StringRight($MSGRECVD, StringLen($MSGRECVD) - $iSpacePos)
                
                ;MsgBox(0, "Variable Name", "'" & $sChangedVariableName & "'")
                ;MsgBox(0, "Variable Value", "'" & $sChangedVariableValue & "'")
                
                ;Run change variable code
                AutoItDebuggerEvent_ChangeVariable($sChangedVariableName, $sChangedVariableValue)
                
            Case $msgType = 1
                $AutoItDebugger_Paused = 0

                ;Log message
                ;GUICtrlSetData($AutoItDebuggerCommandWindowListbox,_Now() & ": Removed Pause")
                
            Case $msgType = 2
                $AutoItDebugger_Quit = 1
                
                ;Log message
                ;GUICtrlSetData($AutoItDebuggerCommandWindowListbox, _Now() & ": Received Quit")
                
        EndSelect

    ElseIf $MsgID = $WM_CLOSE Then ;=== We Recived a WM_CLOSE Message
        Exit
    EndIf
EndFunc   ;==>_GUIRegisterMsgProc


Func _AU3COM_SendData($MessageType, $InfoToSend)
    Local $StructDef_COPYDATA = "dword var1;dword var2;ptr var3"
    Local $CDString = DllStructCreate("char var1[256];char var2[256]") ;the array to hold the string we are sending

    DllStructSetData($CDString, 1, $InfoToSend)
    Local $pCDString = DllStructGetPtr($CDString) ;the pointer to the string
    Local $vs_cds = DllStructCreate($StructDef_COPYDATA);create the message struct
    DllStructSetData($vs_cds, "var1", $MessageType)
    DllStructSetData($vs_cds, "var2", String(StringLen($InfoToSend)));tell the receiver the length of the string
    DllStructSetData($vs_cds, "var3", $pCDString) ;the pointer to the string
    Local $pStruct = DllStructGetPtr($vs_cds)

    _SendMessage(WinGetHandle("AutoIt Debugger - " & $AutoItDebuggerCommandWindowName), $WM_COPYDATA, 0, $pStruct)

    $vs_cds = 0 ;free the struct
    $CDString = 0 ;free the struct

    Return 1
EndFunc   ;==>_AU3COM_SendData


Func _AU3COM_SendData_NewLine($InfoToSend)
    _AU3COM_SendData(1, $InfoToSend)
EndFunc   ;==>_AU3COM_SendData_NewLine


Func _AU3COM_SendData_FinishedLine($InfoToSend)
    _AU3COM_SendData(2, $InfoToSend)
EndFunc   ;==>_AU3COM_SendData_FinishedLine


Func _AU3COM_SendData_SendVariable($InfoToSend)
    _AU3COM_SendData(3, $InfoToSend)
EndFunc   ;==>_AU3COM_SendData_SendVariable


Func _AU3COM_SendData_LoadFile($InfoToSend)
    _AU3COM_SendData(4, $InfoToSend)
EndFunc   ;==>_AU3COM_SendData_LoadFile


Func _AU3COM_SendData_ScriptFinished($InfoToSend)
    _AU3COM_SendData(5, $InfoToSend)
EndFunc   ;==>_AU3COM_SendData_ScriptFinished


Func _AU3COM_SendData_DebugFile($InfoToSend)
    _AU3COM_SendData(6, $InfoToSend)
EndFunc   ;==>_AU3COM_SendData_DebugFile

Func _AU3COM_SendData_ConsoleWrite($InfoToSend)
    _AU3COM_SendData(7, $InfoToSend)
EndFunc   ;==>_AU3COM_SendData_ConsoleWrite

Do you have any idea what might be wrong?

Thanks Steve,

Docfxit

Link to comment
Share on other sites

That's a deprecated AutoIt Opt. Are you using the latest version of the debugger?

I put in my post that I'm using debugger ver. 0.31.0.0. Is there a later version that I haven't found?

I'm using AutoIt ver. 3.3.6.1 with beta ver. 3.3.5.6.

Thanks,

Docfxit

Link to comment
Share on other sites

Hi Mr. Stumpii,

I love your debugger. I'm having a little trouble running a script in the debugger ver. 0.31.0.0 in Win7 64bit.

The error I am getting immediately when I Step Into the first line is:

Line 354 (File "C:\Dnload\9xAddons\Debug\TweakUiPoertoyWin7.DebugScript.au3

Func AutoIt_Debugger_OnAutoItExit()

Error: Duplicate function name

The script I am using is:

Sleep(100)
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
Opt("SendKeyDelay", 5)
AutoItSetOption("TrayIconDebug", 1) ;0-off
; Set so that tray displays current line number

; Include User.INI Info
#include "IniRead.au3"
$Var1 = "C:\Dnload\9xAddons\Ultimate Windows Tweaker v 2.1.zip"
If _OSVersion() = "Win7" Or "Win7X64" Then
    $ProgramFiles = "C:\Programs\"
    $Win7 = "7"
Else
    $ProgramFiles = "C:\Program Files\"
EndIf
RunWait(@Comspec & ' /c C:\Dnload\9xAddons\UnZip.bat "' & $Var1 & '" & "' & $Win7 & '"')
DirCopy("C:\Scratch99\uwtv2.1",$ProgramFiles &  "TweakUIWin7", 1)
FileDelete($ProgramFiles &  "TweakUIWin7\" & "Change log.txt")
Run($ProgramFiles & 'TweakUIWin7\Ultimate Windows Tweaker.exe')
; Remove Scratch99 directory
RunWait(@Comspec & " /c C:\Dnload\9xAddons\RDScratch99.bat ")
While 1 <> 1

Run("C:\Dnload\9xAddons\TweakUiPowertoy XP sp1sp2.exe")
WinWait("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
If Not WinActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ") Then WinActivate("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
WinWaitActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
Send("{ENTER}")
Sleep(15)
msgbox (48, "After Run", "1")
WinWait("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
If Not WinActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ") Then WinActivate("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
WinWaitActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")

Send("{TAB}{UP}{TAB}{TAB}{TAB}{ENTER}")
Sleep(15)
msgbox (48, "After Run", "2")
Send("{ENTER}")

; Install complete

; Setup Auto Login

; Wend
Sleep(300)
Run('C:\WINDOWS\system32\TweakUI.exe')
WinWait("Tweak UI","Tweak UI for Windows")
If Not WinActive("Tweak UI","Tweak UI for Windows") Then WinActivate("Tweak UI","Tweak UI for Windows")
WinWaitActive("Tweak UI","Tweak UI for Windows")
Send("{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RIGHT}{DOWN}")
WinWait("Tweak UI","&Log on automaticall")
If Not WinActive("Tweak UI","&Log on automaticall") Then WinActivate("Tweak UI","&Log on automaticall")
WinWaitActive("Tweak UI","&Log on automaticall")
Send("{TAB}{SPACE}{TAB}{TAB}{ENTER}")
WinWait("Set Autologon Password","Enter the password t")
If Not WinActive("Set Autologon Password","Enter the password t") Then WinActivate("Set Autologon Password","Enter the password t")
WinWaitActive("Set Autologon Password","Enter the password t")
Send("{TAB}{TAB}{ENTER}")
WinWait("Tweak UI","&Log on automaticall")
If Not WinActive("Tweak UI","&Log on automaticall") Then WinActivate("Tweak UI","&Log on automaticall")
WinWaitActive("Tweak UI","&Log on automaticall")
Send("{ENTER}")
WinWait("Set Autologon Password","Enter the password t")
If Not WinActive("Set Autologon Password","Enter the password t") Then WinActivate("Set Autologon Password","Enter the password t")
WinWaitActive("Set Autologon Password","Enter the password t")
Send($Password)
Send("{TAB}")
Send($Password)
Send("{TAB}{ENTER}")
WinWait("Tweak UI","&Log on automaticall")
If Not WinActive("Tweak UI","&Log on automaticall") Then WinActivate("Tweak UI","&Log on automaticall")
WinWaitActive("Tweak UI","&Log on automaticall")
Send("{TAB}{ENTER}")
WEnd
Exit
Func _OSVersion()
    Local $OS_Version, $servicepack_version
    $OS_Version = StringStripWS(StringRegExpReplace(@OSVersion, "(WIN_)|(Microsoft )|(Windows )|(\(TM\))|( Ultimate)", ""), 8)
    $OS_Version = StringRegExpReplace(StringRegExpReplace($OS_Version, '2008', 'Win7'), 'VISTA', 'Vista')
    If RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", 'CurrentBuildNumber') > 7000 Then $OS_Version = 'Win7'
    $servicepack_version = StringReplace(@OSServicePack, "Service Pack ", "SP")
    If @error = -1 Then $servicepack_version = ""

    ConsoleWrite($OS_Version & $servicepack_version & StringRegExpReplace(@OSArch, '(X86)', '') & @CRLF)
    Return $OS_Version & $servicepack_version & StringRegExpReplace(@OSArch, '(X86)', '')
EndFunc   ;==>_OSVersion

The debugger creates a file that looks like this:

#Include <winapi.au3>
#Include <GUIConstants.au3>
#Include <WindowsConstants.au3>
Global $AutoItDebugger_Paused = 0
Global $AutoItDebugger_Quit = 0
Global $AutoItDebuggerCommandWindowName = ""
Global $AutoItDebuggerCommandWindow
Global $AutoItDebuggerCommandWindowListbox
AutoItSetOption("OnExitFunc","AutoIt_Debugger_OnAutoItExit")
AutoIt_Debugger_CreateMessageWindow()
$TempOriginalFileBeingDebuggedFileName = "TweakUiPowertoy Win7.au3"
$TempOriginalFileBeingDebuggedFileFolder = "C:\Dnload\9xAddons"
$TempOriginalFileBeingDebuggedFilePath = "C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3"
AutoIt_Debugger_LoadFile("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3")
AutoIt_Debugger_DebugFile(@ScriptFullPath)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 1, False, @error, @extended)
Sleep(100)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 1, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 2, False, @error, @extended)
Opt("WinWaitDelay",100)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 2, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 3, False, @error, @extended)
Opt("WinTitleMatchMode",4)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 3, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 4, False, @error, @extended)
Opt("WinDetectHiddenText",1)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 4, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 5, False, @error, @extended)
Opt("MouseCoordMode",0)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 5, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 6, False, @error, @extended)
Opt("SendKeyDelay", 5)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 6, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 7, False, @error, @extended)
AutoItSetOption("TrayIconDebug", 1) ;0-off
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 7, False, @error, @extended)
; Set so that tray displays current line number

; Include User.INI Info

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 11, False, @error, @extended)
#Include "C:\Dnload\9xAddons\Debug\IniRead.Debug Script.au3"
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 11, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 12, False, @error, @extended)
$Var1 = "C:\Dnload\9xAddons\Ultimate Windows Tweaker v 2.1.zip"
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 12, False, @error, @extended)
AutoIt_Debugger_SendVariable("$Var1", $Var1, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 13, False, @error, @extended)
If _OSVersion() = "Win7" Or "Win7X64" Then
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 13, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 14, False, @error, @extended)
    $ProgramFiles = "C:\Programs\"
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 14, False, @error, @extended)
AutoIt_Debugger_SendVariable("$ProgramFiles", $ProgramFiles, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 15, False, @error, @extended)
    $Win7 = "7"
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 15, False, @error, @extended)
AutoIt_Debugger_SendVariable("$Win7", $Win7, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 16, False, @error, @extended)
Else
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 16, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 17, False, @error, @extended)
    $ProgramFiles = "C:\Program Files\"
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 17, False, @error, @extended)
AutoIt_Debugger_SendVariable("$ProgramFiles", $ProgramFiles, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 18, False, @error, @extended)
EndIf
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 18, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 19, False, @error, @extended)
RunWait(@Comspec & ' /c C:\Dnload\9xAddons\UnZip.bat "' & $Var1 & '" & "' & $Win7 & '"')
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 19, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 20, False, @error, @extended)
DirCopy("C:\Scratch99\uwtv2.1",$ProgramFiles &  "TweakUIWin7", 1)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 20, False, @error, @extended)
AutoIt_Debugger_SendVariable("$ProgramFiles", $ProgramFiles, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 21, False, @error, @extended)
FileDelete($ProgramFiles &  "TweakUIWin7\" & "Change log.txt")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 21, False, @error, @extended)
AutoIt_Debugger_SendVariable("$ProgramFiles", $ProgramFiles, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 22, False, @error, @extended)
Run($ProgramFiles & 'TweakUIWin7\Ultimate Windows Tweaker.exe')
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 22, False, @error, @extended)
AutoIt_Debugger_SendVariable("$ProgramFiles", $ProgramFiles, @error, @extended)
; Remove Scratch99 directory

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 24, False, @error, @extended)
RunWait(@Comspec & " /c C:\Dnload\9xAddons\RDScratch99.bat ")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 24, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 25, False, @error, @extended)
While 1 <> 1
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 25, False, @error, @extended)


AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 27, False, @error, @extended)
Run("C:\Dnload\9xAddons\TweakUiPowertoy XP sp1sp2.exe")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 27, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 28, False, @error, @extended)
WinWait("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 28, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 29, False, @error, @extended)
If Not WinActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ") Then WinActivate("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 29, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 30, False, @error, @extended)
WinWaitActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 30, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 31, False, @error, @extended)
Send("{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 31, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 32, False, @error, @extended)
Sleep(15)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 32, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 33, False, @error, @extended)
msgbox (48, "After Run", "1")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 33, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 34, False, @error, @extended)
WinWait("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 34, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 35, False, @error, @extended)
If Not WinActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ") Then WinActivate("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 35, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 36, False, @error, @extended)
WinWaitActive("Microsoft Powertoys for Windows XP and Windows Server 2003 Setup","Microsoft Powertoys ")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 36, False, @error, @extended)


AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 38, False, @error, @extended)
Send("{TAB}{UP}{TAB}{TAB}{TAB}{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 38, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 39, False, @error, @extended)
Sleep(15)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 39, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 40, False, @error, @extended)
msgbox (48, "After Run", "2")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 40, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 41, False, @error, @extended)
Send("{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 41, False, @error, @extended)

; Install complete

; Setup Auto Login

; Wend

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 48, False, @error, @extended)
Sleep(300)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 48, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 49, False, @error, @extended)
Run('C:\WINDOWS\system32\TweakUI.exe')
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 49, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 50, False, @error, @extended)
WinWait("Tweak UI","Tweak UI for Windows")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 50, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 51, False, @error, @extended)
If Not WinActive("Tweak UI","Tweak UI for Windows") Then WinActivate("Tweak UI","Tweak UI for Windows")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 51, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 52, False, @error, @extended)
WinWaitActive("Tweak UI","Tweak UI for Windows")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 52, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 53, False, @error, @extended)
Send("{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RIGHT}{DOWN}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 53, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 54, False, @error, @extended)
WinWait("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 54, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 55, False, @error, @extended)
If Not WinActive("Tweak UI","&Log on automaticall") Then WinActivate("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 55, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 56, False, @error, @extended)
WinWaitActive("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 56, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 57, False, @error, @extended)
Send("{TAB}{SPACE}{TAB}{TAB}{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 57, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 58, False, @error, @extended)
WinWait("Set Autologon Password","Enter the password t")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 58, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 59, False, @error, @extended)
If Not WinActive("Set Autologon Password","Enter the password t") Then WinActivate("Set Autologon Password","Enter the password t")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 59, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 60, False, @error, @extended)
WinWaitActive("Set Autologon Password","Enter the password t")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 60, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 61, False, @error, @extended)
Send("{TAB}{TAB}{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 61, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 62, False, @error, @extended)
WinWait("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 62, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 63, False, @error, @extended)
If Not WinActive("Tweak UI","&Log on automaticall") Then WinActivate("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 63, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 64, False, @error, @extended)
WinWaitActive("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 64, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 65, False, @error, @extended)
Send("{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 65, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 66, False, @error, @extended)
WinWait("Set Autologon Password","Enter the password t")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 66, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 67, False, @error, @extended)
If Not WinActive("Set Autologon Password","Enter the password t") Then WinActivate("Set Autologon Password","Enter the password t")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 67, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 68, False, @error, @extended)
WinWaitActive("Set Autologon Password","Enter the password t")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 68, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 69, False, @error, @extended)
Send($Password)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 69, False, @error, @extended)
AutoIt_Debugger_SendVariable("$Password", $Password, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 70, False, @error, @extended)
Send("{TAB}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 70, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 71, False, @error, @extended)
Send($Password)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 71, False, @error, @extended)
AutoIt_Debugger_SendVariable("$Password", $Password, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 72, False, @error, @extended)
Send("{TAB}{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 72, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 73, False, @error, @extended)
WinWait("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 73, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 74, False, @error, @extended)
If Not WinActive("Tweak UI","&Log on automaticall") Then WinActivate("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 74, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 75, False, @error, @extended)
WinWaitActive("Tweak UI","&Log on automaticall")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 75, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 76, False, @error, @extended)
Send("{TAB}{ENTER}")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 76, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 77, False, @error, @extended)
WEnd
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 77, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 78, False, @error, @extended)
Exit
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 78, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 79, False, @error, @extended)
Func _OSVersion()
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 79, False, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 80, False, @error, @extended)
    Local $OS_Version, $servicepack_version
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 80, False, @error, @extended)
AutoIt_Debugger_SendVariable("$OS_Version", $OS_Version, @error, @extended)
AutoIt_Debugger_SendVariable("$servicepack_version", $servicepack_version, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 81, False, @error, @extended)
    $OS_Version = StringStripWS(StringRegExpReplace(@OSVersion, "(WIN_)|(Microsoft )|(Windows )|(\(TM\))|( Ultimate)", ""), 8)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 81, False, @error, @extended)
AutoIt_Debugger_SendVariable("$OS_Version", $OS_Version, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 82, False, @error, @extended)
    $OS_Version = StringRegExpReplace(StringRegExpReplace($OS_Version, '2008', 'Win7'), 'VISTA', 'Vista')
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 82, False, @error, @extended)
AutoIt_Debugger_SendVariable("$OS_Version", $OS_Version, @error, @extended)
AutoIt_Debugger_SendVariable("$OS_Version", $OS_Version, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 83, False, @error, @extended)
    If RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", 'CurrentBuildNumber') > 7000 Then $OS_Version = 'Win7'
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 83, False, @error, @extended)
AutoIt_Debugger_SendVariable("$OS_Version", $OS_Version, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 84, False, @error, @extended)
    $servicepack_version = StringReplace(@OSServicePack, "Service Pack ", "SP")
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 84, False, @error, @extended)
AutoIt_Debugger_SendVariable("$servicepack_version", $servicepack_version, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 85, False, @error, @extended)
    If @error = -1 Then $servicepack_version = ""
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 85, False, @error, @extended)
AutoIt_Debugger_SendVariable("$servicepack_version", $servicepack_version, @error, @extended)


AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 87, False, @error, @extended)
    ConsoleWrite($OS_Version & $servicepack_version & StringRegExpReplace(@OSArch, '(X86)', '') & @CRLF)
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 87, False, @error, @extended)
AutoIt_Debugger_SendVariable("$OS_Version", $OS_Version, @error, @extended)
AutoIt_Debugger_SendVariable("$servicepack_version", $servicepack_version, @error, @extended)
    AutoIt_Debugger_SendConsoleWrite($OS_Version & $servicepack_version & StringRegExpReplace(@OSArch, '(X86)', '') & @CRLF, @error, @extended)

AutoIt_Debugger_NextLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 88, False, @error, @extended)
    Return $OS_Version & $servicepack_version & StringRegExpReplace(@OSArch, '(X86)', '')
AutoIt_Debugger_FinishedLine("C:\Dnload\9xAddons\TweakUiPowertoy Win7.au3", "TweakUiPowertoy Win7.au3", 88, False, @error, @extended)
AutoIt_Debugger_SendVariable("$OS_Version", $OS_Version, @error, @extended)
AutoIt_Debugger_SendVariable("$servicepack_version", $servicepack_version, @error, @extended)
EndFunc   ;==>_OSVersion


Func AutoIt_Debugger_OnAutoItExit()
    AutoIt_Debugger_WaitForExit()
EndFunc

Func CheckForVariableChange($VariableName, $AutoItDebugger_ArrayIndexString,  $VariableValue)
    If $VariableName = "$Var1" Then
        AutoIt_Debugger_GetVariableFromEvent("$Var1", $Var1, $AutoItDebugger_ArrayIndexString,  $VariableValue)
    EndIf
    If $VariableName = "$ProgramFiles" Then
        AutoIt_Debugger_GetVariableFromEvent("$ProgramFiles", $ProgramFiles, $AutoItDebugger_ArrayIndexString,  $VariableValue)
    EndIf
    If $VariableName = "$Win7" Then
        AutoIt_Debugger_GetVariableFromEvent("$Win7", $Win7, $AutoItDebugger_ArrayIndexString,  $VariableValue)
    EndIf
    If $VariableName = "$Password" Then
        AutoIt_Debugger_GetVariableFromEvent("$Password", $Password, $AutoItDebugger_ArrayIndexString,  $VariableValue)
    EndIf
    If $VariableName = "$OS_Version" Then
        AutoIt_Debugger_GetVariableFromEvent("$OS_Version", $OS_Version, $AutoItDebugger_ArrayIndexString,  $VariableValue)
    EndIf
    If $VariableName = "$servicepack_version" Then
        AutoIt_Debugger_GetVariableFromEvent("$servicepack_version", $servicepack_version, $AutoItDebugger_ArrayIndexString,  $VariableValue)
    EndIf
EndFunc

#cs ----------------------------------------------------------------------------
    
    AutoIt Version: 3.2.1.11 (beta)
    Author:         myName
    
    Script Function:
    The command code for the AutoIt Debugger (this was the Include file)
    
#ce ----------------------------------------------------------------------------

;Uncomment the following to check that all variables are defined
;AutoItSetOption("MustDeclareVars", 1)

Func AutoIt_Debugger_CreateMessageWindow()
    ;#Include <winapi.au3>
    ;#include <GUIConstants.au3>
    ;;#Include <Date.au3>
    ;;#include <GUIConstantsEx.au3>
    ;;#include <WindowsConstants.au3>
    ;#include-once

    #Region ### START Koda GUI section ### Form=_AutoIt Debugger Include.kxf
    $AutoItDebuggerCommandWindow = GUICreate("AutoIt Debugger Command Window", 621, 328, 193, 126)
    $AutoItDebuggerCommandWindowListbox = GUICtrlCreateList("", 8, 8, 609, 305)
    #EndRegion ### END Koda GUI section ###
    ;GUISetState(@SW_SHOW)

    ; Register Windows Messages
    GUIRegisterMsg($WM_COPYDATA, "_GUIRegisterMsgProc")

    ;Dim $AutoItDebugger_ClosedByUser
    ;Dim $AutoItDebugger_LastError
    ;Dim $AutoItDebugger_LastExtended
EndFunc   ;==>AutoIt_Debugger_CreateMessageWindow


Func AutoItDebuggerEvent_ChangeVariable($VariableName, $VariableValue)
    ;MsgBox(0, "_AutoIt Debugger Include", "Entered 'AutoItDebuggerEvent_ChangeVariable'")
    
    Dim $AutoItDebugger_ArrayIndexString = ""
    Dim $StrippedVariableName = $VariableName
    
    ;Convert array variables from $asMyArray[1] format to a
    Local $iOpenSquareBracketPos
    $iOpenSquareBracketPos = StringInStr($VariableName, "[")
    If $iOpenSquareBracketPos <> 0 Then
        $StrippedVariableName = StringLeft($VariableName, $iOpenSquareBracketPos - 1)
        ;Strip the variable name and open bracket to leave '1][1]' etc.
        $AutoItDebugger_ArrayIndexString = StringTrimLeft($VariableName, $iOpenSquareBracketPos)
        ;Strip the close bracket to leave '1][1' etc.
        $AutoItDebugger_ArrayIndexString = StringTrimRight($AutoItDebugger_ArrayIndexString, 1)
        ;Remove any ][ from the string and replace with | to make 1][1 into 1|1
        $AutoItDebugger_ArrayIndexString = StringReplace($AutoItDebugger_ArrayIndexString, "][", "|")
        ;MsgBox(0, "_AutoIt Debugger Include", $AutoItDebugger_ArrayIndexString)
    EndIf
    
    ;Check if the variable is actually a variable
    If IsDeclared(StringTrimLeft($VariableName, 1)) Then
        CheckForVariableChange ($StrippedVariableName, $AutoItDebugger_ArrayIndexString, $VariableValue)
    Else
        ;MsgBox features: Title=Yes, Text=Yes, Buttons=OK, Icon=Warning
        MsgBox(48, "_AutoIt Debugger Include", "AutoIt Debugger GUI sent attempted to change the value of an undeclared variable (" & $StrippedVariableName & ")")
    EndIf
EndFunc   ;==>AutoItDebuggerEvent_ChangeVariable


Func AutoIt_Debugger_NextLine($Filepath, $Filename, $LineNumber, $SkipLine, $NextLine_Error, $NextLine_Extended)
    Local $sChangedVariableName
    
    ;Default to single step
    $AutoItDebugger_Paused = 1
    
    ;Send new line status to the Debug GUI
    _AU3COM_SendData_NewLine($Filepath & "|" & $Filename & "|" & $LineNumber & "|" & $SkipLine)


    ;Wait for the GUI to come off pause
    While $AutoItDebugger_Paused
        ;Quit if necessary
        If $AutoItDebugger_Quit Then
            Exit
        EndIf
        
        ;Wait
        Sleep(50)
    WEnd
    
    ;Set error codes for the rest of the program
    SetError($NextLine_Error, $NextLine_Extended)
EndFunc   ;==>AutoIt_Debugger_NextLine


Func AutoIt_Debugger_FinishedLine($Filepath, $Filename, $LineNumber, $SkipLine, $NextLine_Error, $NextLine_Extended)
    
    ;If Not $SkipLine Then
    ;Send new line status to the Debug GUI
    _AU3COM_SendData_FinishedLine($Filepath & "|" & $Filename & "|" & $LineNumber & "|" & $SkipLine)

    ;Send the @error and @extended data on each new line
    _AU3COM_SendData_SendVariable("@error" & "|" & $NextLine_Error)
    _AU3COM_SendData_SendVariable("@extended" & "|" & $NextLine_Extended)
    ;EndIf

    ;Set error codes for the rest of the program
    SetError($NextLine_Error, $NextLine_Extended)
EndFunc   ;==>AutoIt_Debugger_FinishedLine


Func AutoIt_Debugger_WaitForExit()
    ;Send script finished message
    _AU3COM_SendData_ScriptFinished("ScriptFinished")
EndFunc   ;==>AutoIt_Debugger_WaitForExit


Func AutoIt_Debugger_LoadFile($ORiginalScriptFilePath, $ORiginalScriptFileName)
    If $AutoItDebuggerCommandWindowName = "" Then
        ;Take the first script name as the command window name
        $AutoItDebuggerCommandWindowName = $ORiginalScriptFilePath

        ;Change this windows name
        WinSetTitle("AutoIt Debugger Command Window", "", $AutoItDebuggerCommandWindowName & " AutoIt Debugger Command Window")
    EndIf
    
    ;Default to single step
    $AutoItDebugger_Paused = 1

    _AU3COM_SendData_LoadFile($ORiginalScriptFilePath & "|" & $ORiginalScriptFileName)

    ;Wait for the GUI to come off pause
    While $AutoItDebugger_Paused
        ;Quit if necessary
        If $AutoItDebugger_Quit Then
            Exit
        EndIf
        
        ;Wait
        Sleep(50)
    WEnd
EndFunc   ;==>AutoIt_Debugger_LoadFile


Func AutoIt_Debugger_DebugFile($DebugScriptFilePath)
    ;Default to single step
    $AutoItDebugger_Paused = 1

    _AU3COM_SendData_DebugFile($DebugScriptFilePath)

    ;Wait for the GUI to come off pause
    While $AutoItDebugger_Paused
        ;Quit if necessary
        If $AutoItDebugger_Quit Then
            Exit
        EndIf
        
        ;Wait
        Sleep(50)
    WEnd
EndFunc   ;==>AutoIt_Debugger_DebugFile


Func AutoIt_Debugger_SendVariable($VariableName, $VariableValue, $SendVariable_Error, $SendVariable_Extended)
    Local $iNumberOfDims
    Local $iDimXIndex
    Local $iDimYIndex
    Local $iDimZIndex
    
    If IsArray($VariableValue) Then
        ;Find the number of dimensions
        $iNumberOfDims = UBound($VariableValue, 0)
        Select
            Case $iNumberOfDims = 1
                ;Send each array index seperatly
                For $iDimXIndex = 0 To UBound($VariableValue, 1) - 1
                    ;$oDebug.SendVariable ($VariableName & "[" & $iDimXIndex & "]", AutoIt_Debugger_ReturnVariableValue($VariableName, $VariableValue[$iDimXIndex]))
                    _AU3COM_SendData_SendVariable($VariableName & "[" & $iDimXIndex & "]" & "|" & AutoIt_Debugger_ReturnVariableValue($VariableName, $VariableValue[$iDimXIndex]))
                Next
                
            Case $iNumberOfDims = 2
                ;Repeat for each X dimension
                For $iDimXIndex = 0 To UBound($VariableValue, 1) - 1
                    ;Repeat for each Y dimension
                    For $iDimYIndex = 0 To UBound($VariableValue, 2) - 1
                        ;$oDebug.SendVariable ($VariableName & "[" & $iDimXIndex & "][" & $iDimYIndex & "]", AutoIt_Debugger_ReturnVariableValue($VariableName, $VariableValue[$iDimXIndex][$iDimYIndex]))
                        _AU3COM_SendData_SendVariable($VariableName & "[" & $iDimXIndex & "][" & $iDimYIndex & "]" & "|" & AutoIt_Debugger_ReturnVariableValue($VariableName, $VariableValue[$iDimXIndex][$iDimYIndex]))
                    Next
                Next
                
            Case $iNumberOfDims = 3
                ;Repeat for each X dimension
                For $iDimXIndex = 0 To UBound($VariableValue, 1) - 1
                    ;Repeat for each Y dimension
                    For $iDimYIndex = 0 To UBound($VariableValue, 2) - 1
                        ;Repeat for each Z dimension
                        For $iDimZIndex = 0 To UBound($VariableValue, 3) - 1
                            ;$oDebug.SendVariable ($VariableName & "[" & $iDimXIndex & "][" & $iDimYIndex & "][" & $iDimZIndex & "]", AutoIt_Debugger_ReturnVariableValue($VariableName, $VariableValue[$iDimXIndex][$iDimYIndex][$iDimZIndex]))
                            _AU3COM_SendData_SendVariable($VariableName & "[" & $iDimXIndex & "][" & $iDimYIndex & "][" & $iDimZIndex & "]" & "|" & AutoIt_Debugger_ReturnVariableValue($VariableName, $VariableValue[$iDimXIndex][$iDimYIndex][$iDimZIndex]))
                        Next
                    Next
                Next
                
            Case Else
                ;$oDebug.SendVariable ($VariableName, "<Array has too many dims>")
                _AU3COM_SendData_SendVariable($VariableName & "|" & "<Array has too many dims>")
        EndSelect
    Else
        ;$oDebug.SendVariable ($VariableName, AutoIt_Debugger_ReturnVariableValue($VariableValue))
        _AU3COM_SendData_SendVariable($VariableName & "|" & AutoIt_Debugger_ReturnVariableValue($VariableName, $VariableValue))
    EndIf

    ;Set error codes for the rest of the program
    SetError($SendVariable_Error, $SendVariable_Extended)
EndFunc   ;==>AutoIt_Debugger_SendVariable


Func AutoIt_Debugger_SendConsoleWrite($OutputString, $SendVariable_Error, $SendVariable_Extended)

    _AU3COM_SendData_ConsoleWrite($OutputString)

    ;Set error codes for the rest of the program
    SetError($SendVariable_Error, $SendVariable_Extended)
EndFunc   ;==>AutoIt_Debugger_SendVariable


Func AutoIt_Debugger_ReturnVariableValue($AutoIt_Debugger_VariableName, $AutoIt_Debugger_VariableValue)
    Local $AutoIt_Debugger_sRes = ""
    ;$AutoIt_Debugger_VariableValue = Execute($AutoIt_Debugger_VariableName)
    If IsBool($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= $AutoIt_Debugger_VariableValue
    If IsFloat($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= $AutoIt_Debugger_VariableValue
    If IsInt($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes&= $AutoIt_Debugger_VariableValue
    ;If IsNumber($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= $AutoIt_Debugger_VariableValue
    If IsString($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= $AutoIt_Debugger_VariableValue
    If IsArray($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= $AutoIt_Debugger_VariableValue
    If IsObj($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes&= "<Object>" & $AutoIt_Debugger_VariableValue
    If IsBinary($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= "<Binary>" & $AutoIt_Debugger_VariableValue
    If IsHWnd($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= "<HWnd>" & $AutoIt_Debugger_VariableValue
    If IsKeyword($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= "<Keyword>" & $AutoIt_Debugger_VariableValue
    If IsDllStruct($AutoIt_Debugger_VariableValue) Then $AutoIt_Debugger_sRes &= "<DllStructure>" & $AutoIt_Debugger_VariableValue
    
    If StringLeft($AutoIt_Debugger_VariableName, 1) <> "$" Then $AutoIt_Debugger_VariableName = "$" & $AutoIt_Debugger_VariableName
    If Not IsDeclared(StringTrimLeft($AutoIt_Debugger_VariableName, 1)) Then $AutoIt_Debugger_sRes &= "<Undeclared>"

    Return $AutoIt_Debugger_sRes
EndFunc   ;==>AutoIt_Debugger_ReturnVariableValue


Func AutoIt_Debugger_GetVariableFromEvent($VariableName, ByRef $Variable, $AutoItDebugger_ArrayIndexString, $VariableValue)
    ;MsgBox(0, "_AutoIt Debugger Include", "Entered 'AutoIt_Debugger_GetVariableFromEvent'")

    Local $iNumberOfDims
    Local $iDimXIndex
    Local $iDimYIndex
    Local $iDimZIndex
    Local $ArrayIndexArray
    
    If IsBool($Variable) Or IsFloat($Variable) Or IsInt($Variable) Or IsNumber($Variable) Or IsString($Variable) Then
        $Variable = $VariableValue
        ;MsgBox(0, "_AutoIt Debugger Include", "New value of '" & $VariableName & " is '" & $Variable & "'")
    ElseIf IsArray($Variable) Then
        ;Extract the array section, split by |s
        $ArrayIndexArray = StringSplit($AutoItDebugger_ArrayIndexString, "|")

        ;Find the number of dimensions
        $iNumberOfDims = $ArrayIndexArray[0]
        Select
            Case $iNumberOfDims = 1
                ;Set the value based on the array index
                $Variable[$ArrayIndexArray[1]] = $VariableValue
                
            Case $iNumberOfDims = 2
                ;Set the value based on the array index
                $Variable[$ArrayIndexArray[1]][$ArrayIndexArray[2]] = $VariableValue
                
            Case $iNumberOfDims = 3
                ;Set the value based on the array index
                $Variable[$ArrayIndexArray[1]][$ArrayIndexArray[2]][$ArrayIndexArray[3]] = $VariableValue
                
            Case Else
                ;Do nothing
        EndSelect
        
    ElseIf IsObj($Variable) Then
        ;Do nothing
    ElseIf IsBinary ($Variable) Then
        ;Do nothing
    ElseIf IsHWnd($Variable) Then
        ;Do nothing
    ElseIf IsKeyword($Variable) Then
        ;Do nothing
    EndIf
EndFunc   ;==>AutoIt_Debugger_GetVariableFromEvent


; Message Handler
Func _GUIRegisterMsgProc($hWnd, $MsgID, $WParam, $LParam)
    If $MsgID = $WM_COPYDATA Then
        
        ; $LParam = Poiter to a COPYDATA Struct
        Local $STRUCTDEF_AU3MESSAGE = "char var1[256]"
        Local $STRUCTDEF_AU3MESSAGELEN = "dword var1"
        Local $StructDef_COPYDATA = "dword var1;dword var2;ptr var3"
        
        ;Set a reference to the COPYDATA structure
        Local $vs_cds = DllStructCreate($StructDef_COPYDATA, $LParam)
        ;Extract the command (the 1st element)
        Local $msgType = DllStructGetData($vs_cds, 1)
        
        ;MsgBox(0, "AutoIt Debugger", "Command Received: " & $msgType)

        Select
            Case $msgType = 0

                ;Log message
                ;GUICtrlSetData($AutoItDebuggerCommandWindowListbox,_Now() & ": New variable")

                ;Get the message length from the 2nd element
                Local $msglen1 = DllStructGetData($vs_cds, 2)
                Local $STRUCTDEF_AU3MESSAGE1 = "char var1[" & $msglen1 & "]"
                Local $vs_msg1 = DllStructCreate($STRUCTDEF_AU3MESSAGE1, DllStructGetData($vs_cds, 3))
                
                ;Display what we have recived
                Local $MSGRECVD = DllStructGetData($vs_msg1, 1)
                ;MsgBox(0, "Recver - Test String", $MSGRECVD)

                Local $iSpacePos
                $iSpacePos = StringInStr($MSGRECVD, " ")
                Dim $sChangedVariableName = StringLeft($MSGRECVD, $iSpacePos - 1)
                Dim $sChangedVariableValue = StringRight($MSGRECVD, StringLen($MSGRECVD) - $iSpacePos)
                
                ;MsgBox(0, "Variable Name", "'" & $sChangedVariableName & "'")
                ;MsgBox(0, "Variable Value", "'" & $sChangedVariableValue & "'")
                
                ;Run change variable code
                AutoItDebuggerEvent_ChangeVariable($sChangedVariableName, $sChangedVariableValue)
                
            Case $msgType = 1
                $AutoItDebugger_Paused = 0

                ;Log message
                ;GUICtrlSetData($AutoItDebuggerCommandWindowListbox,_Now() & ": Removed Pause")
                
            Case $msgType = 2
                $AutoItDebugger_Quit = 1
                
                ;Log message
                ;GUICtrlSetData($AutoItDebuggerCommandWindowListbox, _Now() & ": Received Quit")
                
        EndSelect

    ElseIf $MsgID = $WM_CLOSE Then ;=== We Recived a WM_CLOSE Message
        Exit
    EndIf
EndFunc   ;==>_GUIRegisterMsgProc


Func _AU3COM_SendData($MessageType, $InfoToSend)
    Local $StructDef_COPYDATA = "dword var1;dword var2;ptr var3"
    Local $CDString = DllStructCreate("char var1[256];char var2[256]") ;the array to hold the string we are sending

    DllStructSetData($CDString, 1, $InfoToSend)
    Local $pCDString = DllStructGetPtr($CDString) ;the pointer to the string
    Local $vs_cds = DllStructCreate($StructDef_COPYDATA);create the message struct
    DllStructSetData($vs_cds, "var1", $MessageType)
    DllStructSetData($vs_cds, "var2", String(StringLen($InfoToSend)));tell the receiver the length of the string
    DllStructSetData($vs_cds, "var3", $pCDString) ;the pointer to the string
    Local $pStruct = DllStructGetPtr($vs_cds)

    _SendMessage(WinGetHandle("AutoIt Debugger - " & $AutoItDebuggerCommandWindowName), $WM_COPYDATA, 0, $pStruct)

    $vs_cds = 0 ;free the struct
    $CDString = 0 ;free the struct

    Return 1
EndFunc   ;==>_AU3COM_SendData


Func _AU3COM_SendData_NewLine($InfoToSend)
    _AU3COM_SendData(1, $InfoToSend)
EndFunc   ;==>_AU3COM_SendData_NewLine


Func _AU3COM_SendData_FinishedLine($InfoToSend)
    _AU3COM_SendData(2, $InfoToSend)
EndFunc   ;==>_AU3COM_SendData_FinishedLine


Func _AU3COM_SendData_SendVariable($InfoToSend)
    _AU3COM_SendData(3, $InfoToSend)
EndFunc   ;==>_AU3COM_SendData_SendVariable


Func _AU3COM_SendData_LoadFile($InfoToSend)
    _AU3COM_SendData(4, $InfoToSend)
EndFunc   ;==>_AU3COM_SendData_LoadFile


Func _AU3COM_SendData_ScriptFinished($InfoToSend)
    _AU3COM_SendData(5, $InfoToSend)
EndFunc   ;==>_AU3COM_SendData_ScriptFinished


Func _AU3COM_SendData_DebugFile($InfoToSend)
    _AU3COM_SendData(6, $InfoToSend)
EndFunc   ;==>_AU3COM_SendData_DebugFile

Func _AU3COM_SendData_ConsoleWrite($InfoToSend)
    _AU3COM_SendData(7, $InfoToSend)
EndFunc   ;==>_AU3COM_SendData_ConsoleWrite

Do you have any idea what might be wrong?

Thanks Steve,

Docfxit

That will be fixed in the next version. Next version should fix the issues with 'file not found' errors and x64 issues.

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

New version of debugger. See first post for link. Here are the changes.

I am also interested in a new name for the program. As it is now more editor/IDE than just a debugger, I think that name may put some people off. AutIDE is one that springs to mind. Also any suggestions for an icon would be nice.

Rev 0.32.0 - 20 Jul 10

Outstanding issue: When dubugging code, the code window does not highlight the current line unless the caret is visible. Click anywhere in the code window to make it appear on the next step.

Added: Some more keyboard shortcuts,

Changed: Added a couple of missing icons.

Fixed: Problem where Function and Variables windows were not updated when a file was opened.

Fixed: Hopefully fix the file not found error. Thanks to everyone that let me know of the issue.

Changed: AutoIt DOS functions (Check and Compile) no longer flash DOS popups.

Changed: Enabled find, replace, comment and uncomment buttons.

Changed: AutoItSetOption 'OnAutoItExit' replaced with new function 'OnAutoItExitRegister. Thanks docfxit.

Changed: Upgraded to VS2010. Upgrade most controls as well.

Added: Detected encoding to statusbar.

Added: File now saves in most efficient encoding format.

Fixed: Cleaned up 'DockPanel.config' file. Should allow all tools windows to be opened in debug mode. Thanks gcriaco.

Changed: Program now opens a default Untitled.au3 file instead of an unsaved one.

Added: Check for AutoIt updates.

Added: Double clicking Orb closes program.

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

Hi, Stumpii

In new version 0.32.0, the breakpoint for debug is lost after press F5 or RUN.

For use the breakpoints i run the debug with F8 or Step Into and then i set the breakpoints, but when i exit the debug, the breakpoints aren't saved for future use.

Link to comment
Share on other sites

  • 2 weeks later...

I'm trying to run the debugger version .32 on Windows 7 x86 and every single time I hit Run or Step Into it crashes and won't continue. The error I get is

Error: Object reference not set to an instance of an object

This error happens on any and all scripts I tried, including the test script Hello World that comes with the debugger. If I downgrade back to the previous version it works fine. Anything else that you might need to troubleshoot this I can send your way, let me know.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

I'm trying to run the debugger version .32 on Windows 7 x86 and every single time I hit Run or Step Into it crashes and won't continue. The error I get is

Error: Object reference not set to an instance of an object

This error happens on any and all scripts I tried, including the test script Hello World that comes with the debugger. If I downgrade back to the previous version it works fine. Anything else that you might need to troubleshoot this I can send your way, let me know.

Can you send/post the complete error?

Thanks,

Steve

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

Can you send/post the complete error?

Thanks,

Steve

I figured out what the problem is. When the program starts, it automatically creates the Untitled.au3 program. With the new version you have a combo box that lists which file you want to debug, which I hadn't noticed at first and wasn't there before, and if I delete the Untitled.au3 file the debugger is trying to debug the file that no longer exists. If I change the file to debug in the combo box to the correct file, it works ok. There seems to be a bug in the program that it's not checking for the existence of the file selected before trying to run, it should give me an error message telling me that I have the wrong file name selected and give me a chance to try again, as it is now, it just crashes.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

I figured out what the problem is. When the program starts, it automatically creates the Untitled.au3 program. With the new version you have a combo box that lists which file you want to debug, which I hadn't noticed at first and wasn't there before, and if I delete the Untitled.au3 file the debugger is trying to debug the file that no longer exists. If I change the file to debug in the combo box to the correct file, it works ok. There seems to be a bug in the program that it's not checking for the existence of the file selected before trying to run, it should give me an error message telling me that I have the wrong file name selected and give me a chance to try again, as it is now, it just crashes.

Thanks. I will look into it.

Steve

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

  • 1 month later...

- Graphical AutoIt Debugger runs very slowly on my job's computer (Pentium 4 | 1GB RAM | Win XP Pro SP3).

- Only works properly using scripts in english?

Like, for example using accents:

MsgBox(0, "Título", "Você é inteligente.")

after I save/run using the Debugger, will be like this:

MsgBox(0, "T�tulo", "Voc� � inteligente.")
Edited by SeF
Link to comment
Share on other sites

  • 6 months later...

Not support Chinese :)

By the way, could it use two tabs where one show the GUI and the other for the GUI's code?

As the GUI is being handled by Koda, there is no way to have it in a tab. Sorry.

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

Not support Chinese :)

By the way, could it use two tabs where one show the GUI and the other for the GUI's code?

As the GUI is being handled by Koda, there is no way to have it in a tab. Sorry.

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

I tried to download the latest version and I am not able to get to the site, I get a connection reset error. Is your site down?

I have only tried it at work, but will try it as well when I get home.

[font="Verdana"]People who say it cannot be done should not interrupt those who are doing it. - George Benard Shaw[/font]

Link to comment
Share on other sites

I tried to download the latest version and I am not able to get to the site, I get a connection reset error. Is your site down?

I have only tried it at work, but will try it as well when I get home.

I have downloaded today and it worked fine.

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

  • 2 weeks later...

Been a spate of updates recently and once bugs have been sorted out, I will start on some new features. I am interested in user feedback on what would we useful additions to the program as well.

Download link in the first post, or just run the program if you have it installed.

Rev 0.35.0 - 16 Apr 11

Added: New users now get the default window settings (nice layout) instead of the nasty original layout.

Added: Warning when running from Program Files folder in portable mode.

Added: Save Trace option (on Window ribbon tab). Thanks samshu.

Changed: Due to Win 7 UAC, removed test scripts.

Changed: Due to Win 7 UAC requiring data be stored in AppData folder, setup no longer prompts to deletes settings.

Changed: At the end of debugging, user is prompted to go back to dev mode to allow them to look at watch and trace before they close. Thanks BodoWitcha.

Rev 0.34.0 - 7 Apr 11

Fixed: Problem saving settings.

Changed: Command line arguments now saved to a separate config file for each au3 file.

Changed: Watched Variables now saved to a separate config file for each au3 file.

Rev 0.33.0 - 1 Apr 11

Changed: Options popup appears centre of the debugger now. Thanks Leem.

Changed: Path are not stored absolute with drive name changed for portability.

Changed: Changed Run, Build and Compile to work the same as in SciTE.

Added: Latest SciTE au3.api is now compiled into the program on each new revision.

Added: Tools button for Au3Info.

Added: Tools button for Macro Generator.

Changed: Made the program more UAC compliant.

Changed: Compile with Options changed to Build.

Fixed: Breakpoints now saved correctly. Thanks nkono.

Changed: On document reload, current document position is retained.

Changed: Middle clicking on tabs now closes them (DockPanel Suite upgraded to 2.5RC1).

Added: On doc opening, last position is now shown. Thanks Max1234.

Added: Mouse over tooltip of debug variable values. Thanks fishy.

Added: Mouse over functions shows function help calltip.

Changed: Untitled now loaded from AppData folder, not Program Files (for UAC).

Edited by Stumpii

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

New quick fix:

See first post for download link.

Rev 0.36.0 - 17 Apr 11

Fixed: All document events were deleted when the new ScintillaNet control was added.

Added: F1 brings up help for selected word in Toolchest.

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

New quick fix. See first post for download link.

Rev 0.37.0 - 19 Apr 11

Fixed: Debug tooltip error on undeclared variables. Thanks BodoWitcha.

Changed: Disable Beta mode if AutoIt Beta is not installed.

Changed: ScitTE and AutoIt paths now default to either Program Files or Program Files (x86).

Added: Better detection if SciTE and AutoIt folders are not correct. Thanks BodoWitcha and gcriaco.

Added: Curly brackets to surround command line arguments so that double quotes are saved correctly. Thanks BodoWitcha.

Fixed: Corrected order of command line argument in Run Script command. Thanks BodoWitcha.

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
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
 Share

  • Recently Browsing   0 members

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