mLipok Posted September 22, 2013 Share Posted September 22, 2013 (edited) in top of this file variable_list.au3 add #AutoIt3Wrapper_run_debug_mode=Y run this script using F5 when file open dialog appears select "test_Variable_DUMP.au3" give me back a console output edit: put it to forum as "plain text" using the "A" button Edited September 22, 2013 by mlipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
michaelslamet Posted September 23, 2013 Share Posted September 23, 2013 @Mlipok expandcollapse popup>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\windows\Desktop\app\Variable_list.au3" /UserParams +>07:13:53 Starting AutoIt3Wrapper v.2.1.0.33 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 2 CPU:X64 OS:X86) >Running AU3Check (1.54.22.0) from:C:\Program Files\AutoIt3 +>07:13:54 AU3Check ended.rc:0 >Running:(3.3.8.1):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\windows\Desktop\app\Variable_list.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop !> Starting in DebugMode.. Line: @error-@extended: Line syntax 0001: 0-0: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** 0002: 0-0: #AutoIt3Wrapper_UseUpx=n 0003: 0-0: #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** 0006: 0-0: #AutoIt3Wrapper_run_debug_mode=Y 0008: 0-0: #include <array.au3> 0010: 0-0: If $CmdLine[0] = 1 Then 0016: 0-0: Local $fFile = FileOpenDialog("Select Au3 File", @ScriptDir, "Au3 File (*.au3)") 0017: 0-0: _ListOfGlobalVariables($fFile) 0022: 0-0: Local $_sGlobalVariableList = "" 0023: 0-0: Local $sFileContent = FileRead($fFile) 0024: 0-11353: Local $sFileContent_temp = StringRegExpReplace($sFileContent, "(*ANYCRLF)\s*;.*", "") 0025: 0-90: $sFileContent_temp = StringRegExpReplace($sFileContent_temp, "(\s{2,})", " ") 0026: 0-243: $sFileContent_temp = StringRegExpReplace($sFileContent_temp, "(?is)(Func .*?EndFunc.*?\r\n", @CRLF) 0027: 2-29: $sFileContent_temp = StringRegExpReplace($sFileContent_temp, "(?is)(\#ce.*?\#cs|\#comments-start.*?\#comments-end)", "") 0028: 0-0: Local $aTempGlobalVariableList = StringRegExp($sFileContent_temp, "(?<=Global )(\$.*?)(?:\s|\[)", 3) 0029: 0-0: If IsArray($aTempGlobalVariableList) = 0 Then 0033: 0-0: $aTempGlobalVariableList = _ArrayUnique($aTempGlobalVariableList) 0034: 0-0: _ArrayDelete($aTempGlobalVariableList, 0) 0035: 0-0: If _ArraySearch($aTempGlobalVariableList, "$_sGlobalVariableList") <> -1 Then _ArrayDelete($aTempGlobalVariableList, _ArraySearch($aTempGlobalVariableList, "$_sGlobalVariableList")) 0036: 6-0: _ArraySort($aTempGlobalVariableList) 0037: 0-0: $_sGlobalVariableList = "Global $_sGlobalVariableList = """ & @CRLF 0038: 0-0: $_sGlobalVariableList &= "$_sGlobalVariableList &= "" 0039: 0-0: ConsoleWrite("Variable_list: _ArrayToString: START:" & @CRLF) Variable_list: _ArrayToString: START: 0040: 0-0: ConsoleWrite(_ArrayToString($aTempGlobalVariableList) & @CRLF) $aFuncNames|$array|$binary|$bool|$false|$float|$hex|$hwnd|$int|$keyword|$number|$ptr|$string|$struct|$true 0041: 0-0: ConsoleWrite("Variable_list: _ArrayToString: END:" & @CRLF) Variable_list: _ArrayToString: END: 0042: 0-0: For $iVar = 0 To (UBound($aTempGlobalVariableList) - 1) 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0047: 0-0: If Mod(Number($iVar + 1), 5) = 0 Then 0051: 0-0: EndIf 0052: 0-0: Next 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0047: 0-0: If Mod(Number($iVar + 1), 5) = 0 Then 0051: 0-0: EndIf 0052: 0-0: Next 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0047: 0-0: If Mod(Number($iVar + 1), 5) = 0 Then 0051: 0-0: EndIf 0052: 0-0: Next 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0047: 0-0: If Mod(Number($iVar + 1), 5) = 0 Then 0051: 0-0: EndIf 0052: 0-0: Next 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0047: 0-0: If Mod(Number($iVar + 1), 5) = 0 Then 0048: 0-0: $_sGlobalVariableList &= """ & @CRLF 0049: 0-0: $_sGlobalVariableList &= "$_sGlobalVariableList &= "" 0050: 0-0: EndIf 0051: 0-0: EndIf 0052: 0-0: Next 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0047: 0-0: If Mod(Number($iVar + 1), 5) = 0 Then 0051: 0-0: EndIf 0052: 0-0: Next 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0047: 0-0: If Mod(Number($iVar + 1), 5) = 0 Then 0051: 0-0: EndIf 0052: 0-0: Next 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0047: 0-0: If Mod(Number($iVar + 1), 5) = 0 Then 0051: 0-0: EndIf 0052: 0-0: Next 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0047: 0-0: If Mod(Number($iVar + 1), 5) = 0 Then 0051: 0-0: EndIf 0052: 0-0: Next 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0047: 0-0: If Mod(Number($iVar + 1), 5) = 0 Then 0048: 0-0: $_sGlobalVariableList &= """ & @CRLF 0049: 0-0: $_sGlobalVariableList &= "$_sGlobalVariableList &= "" 0050: 0-0: EndIf 0051: 0-0: EndIf 0052: 0-0: Next 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0047: 0-0: If Mod(Number($iVar + 1), 5) = 0 Then 0051: 0-0: EndIf 0052: 0-0: Next 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0047: 0-0: If Mod(Number($iVar + 1), 5) = 0 Then 0051: 0-0: EndIf 0052: 0-0: Next 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0047: 0-0: If Mod(Number($iVar + 1), 5) = 0 Then 0051: 0-0: EndIf 0052: 0-0: Next 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0047: 0-0: If Mod(Number($iVar + 1), 5) = 0 Then 0051: 0-0: EndIf 0052: 0-0: Next 0043: 0-0: $_sGlobalVariableList &= $aTempGlobalVariableList[$iVar] & "|" 0044: 0-0: If $iVar = (UBound($aTempGlobalVariableList) - 1) Then 0045: 0-0: $_sGlobalVariableList = StringTrimRight($_sGlobalVariableList, 1) & """ & @CRLF 0046: 0-0: Else 0052: 0-0: Next 0053: 0-0: EndIf 0054: 0-0: Local $sGlobalVariableRegion = "" 0055: 0-0: $sGlobalVariableRegion &= "#region Global and Local "Variable List Declaration"" & @CRLF 0056: 0-0: $sGlobalVariableRegion &= $_sGlobalVariableList & @CRLF 0057: 0-0: $sGlobalVariableRegion &= "#endregion Global and Local "Variable List Declaration"" & @CRLF 0058: 0-0: ConsoleWrite("Adding:" & @CRLF) Adding: 0059: 0-0: ConsoleWrite($sGlobalVariableRegion & @CRLF) #region Global and Local "Variable List Declaration" Global $_sGlobalVariableList = "" $_sGlobalVariableList &= "$aFuncNames|$array|$binary|$bool|$false|" $_sGlobalVariableList &= "$float|$hex|$hwnd|$int|$keyword|" $_sGlobalVariableList &= "$number|$ptr|$string|$struct|$true" #endregion Global and Local "Variable List Declaration" 0061: 0-0: $sFileContent = StringRegExpReplace($sFileContent, "(?is)\#region \$sVariableList.*?\#endregion \$sVariableList\r\n", "") 0063: 0-0: $sFileContent = StringRegExpReplace($sFileContent, "(?is)\#region Global and Local \"Variable List Declaration\".*?\#endregion Global and Local \"Variable List Declaration\"\r\n", $sGlobalVariableRegion) 0064: 0-0: If @extended = 0 Then $sFileContent = $sGlobalVariableRegion & @CRLF & $sFileContent 0065: 0-0: FileMove($fFile, StringReplace($fFile, ".au3", "__VariableList_BackUp.au3")) 0066: 0-0: FileWrite(@ScriptDir & "VariableList_temp.au3", $sFileContent) 0067: 0-0: FileMove(@ScriptDir & "VariableList_temp.au3", $fFile, 1) 0068: 0-0: EndFunc ;==>_ListOfGlobalVariables 0018: 0-0: _FunctionStartStop($fFile) 0071: 0-0: Local $_sLocalVariableList = "" 0072: 0-0: Local $sFunc_new = "" 0073: 0-0: Local $aFuncName = "" 0074: 0-0: Local $sFileContent = FileRead($fFile) 0075: 0-11696: $sFileContent = StringRegExpReplace($sFileContent, "(?i)\r\n\s*?_Func_start.*?\r\n", @CRLF) 0076: 0-0: $sFileContent = StringRegExpReplace($sFileContent, "(?i)\r\n\s*?_Func_End.*?\r\n", @CRLF) 0077: 0-0: $aFunctions = StringRegExp($sFileContent, "(?is)(Func .*?EndFunc.*?\r\n)", 3) 0078: 0-0: For $sFunc In $aFunctions 0079: 0-0: If StringInStr($sFunc, "Func Intercept_MessageBoxW(") = 0 And StringInStr($sFunc, "Func AddHookApi(") = 0 And StringInStr($sFunc, "Func VirtualProtect(") = 0 And StringInStr($sFunc, "Func ImageDirectoryEntryToData(") = 0 And StringInStr($sFunc, "Func _GetVariablesValue(") = 0 And StringInStr($sFunc, "_Func_Start(") = 0 And StringInStr($sFunc, "_Func_End(") = 0 Then 0094: 0-0: Next 0079: 0-0: If StringInStr($sFunc, "Func Intercept_MessageBoxW(") = 0 And StringInStr($sFunc, "Func AddHookApi(") = 0 And StringInStr($sFunc, "Func VirtualProtect(") = 0 And StringInStr($sFunc, "Func ImageDirectoryEntryToData(") = 0 And StringInStr($sFunc, "Func _GetVariablesValue(") = 0 And StringInStr($sFunc, "_Func_Start(") = 0 And StringInStr($sFunc, "_Func_End(") = 0 Then 0088: 0-0: $sFunc_new = StringRegExpReplace($sFunc, "(?is)(Func )(.*?)(\(.*?\)\r\n)(.*?)(EndFunc.*?\r\n)", "$1$2$3 _Func_Start("$2")" & @CRLF & "$4 _Func_End("$2")" & @CRLF & "$5") 0089: 0-7: $aFuncName = StringRegExp($sFunc_new, "(?i)(?:Func )(.*?)(?:\()", 3) 0090: 0-0: $sFunc_new = StringRegExpReplace($sFunc_new, "(?i)(\r\n)(\s*?)(Return)", @CRLF & "$2_Func_End("" & $aFuncName[0] & "")$1$2$3") 0091: 0-0: $sFunc_new = StringRegExpReplace($sFunc_new, "(?i)(_Func_End.*\r\n\s*?Return.*?)(\r\n\s*_Func_End\(.*?\))", "$1") 0092: 0-0: $sFileContent = StringReplace($sFileContent, $sFunc, $sFunc_new) 0093: 0-1: EndIf 0094: 0-1: Next 0079: 0-1: If StringInStr($sFunc, "Func Intercept_MessageBoxW(") = 0 And StringInStr($sFunc, "Func AddHookApi(") = 0 And StringInStr($sFunc, "Func VirtualProtect(") = 0 And StringInStr($sFunc, "Func ImageDirectoryEntryToData(") = 0 And StringInStr($sFunc, "Func _GetVariablesValue(") = 0 And StringInStr($sFunc, "_Func_Start(") = 0 And StringInStr($sFunc, "_Func_End(") = 0 Then 0088: 0-0: $sFunc_new = StringRegExpReplace($sFunc, "(?is)(Func )(.*?)(\(.*?\)\r\n)(.*?)(EndFunc.*?\r\n)", "$1$2$3 _Func_Start("$2")" & @CRLF & "$4 _Func_End("$2")" & @CRLF & "$5") 0089: 0-7: $aFuncName = StringRegExp($sFunc_new, "(?i)(?:Func )(.*?)(?:\()", 3) 0090: 0-0: $sFunc_new = StringRegExpReplace($sFunc_new, "(?i)(\r\n)(\s*?)(Return)", @CRLF & "$2_Func_End("" & $aFuncName[0] & "")$1$2$3") 0091: 0-0: $sFunc_new = StringRegExpReplace($sFunc_new, "(?i)(_Func_End.*\r\n\s*?Return.*?)(\r\n\s*_Func_End\(.*?\))", "$1") 0092: 0-0: $sFileContent = StringReplace($sFileContent, $sFunc, $sFunc_new) 0093: 0-1: EndIf 0094: 0-1: Next 0079: 0-1: If StringInStr($sFunc, "Func Intercept_MessageBoxW(") = 0 And StringInStr($sFunc, "Func AddHookApi(") = 0 And StringInStr($sFunc, "Func VirtualProtect(") = 0 And StringInStr($sFunc, "Func ImageDirectoryEntryToData(") = 0 And StringInStr($sFunc, "Func _GetVariablesValue(") = 0 And StringInStr($sFunc, "_Func_Start(") = 0 And StringInStr($sFunc, "_Func_End(") = 0 Then 0088: 0-0: $sFunc_new = StringRegExpReplace($sFunc, "(?is)(Func )(.*?)(\(.*?\)\r\n)(.*?)(EndFunc.*?\r\n)", "$1$2$3 _Func_Start("$2")" & @CRLF & "$4 _Func_End("$2")" & @CRLF & "$5") 0089: 0-7: $aFuncName = StringRegExp($sFunc_new, "(?i)(?:Func )(.*?)(?:\()", 3) 0090: 0-0: $sFunc_new = StringRegExpReplace($sFunc_new, "(?i)(\r\n)(\s*?)(Return)", @CRLF & "$2_Func_End("" & $aFuncName[0] & "")$1$2$3") 0091: 0-8: $sFunc_new = StringRegExpReplace($sFunc_new, "(?i)(_Func_End.*\r\n\s*?Return.*?)(\r\n\s*_Func_End\(.*?\))", "$1") 0092: 0-1: $sFileContent = StringReplace($sFileContent, $sFunc, $sFunc_new) 0093: 0-1: EndIf 0094: 0-1: Next 0079: 0-1: If StringInStr($sFunc, "Func Intercept_MessageBoxW(") = 0 And StringInStr($sFunc, "Func AddHookApi(") = 0 And StringInStr($sFunc, "Func VirtualProtect(") = 0 And StringInStr($sFunc, "Func ImageDirectoryEntryToData(") = 0 And StringInStr($sFunc, "Func _GetVariablesValue(") = 0 And StringInStr($sFunc, "_Func_Start(") = 0 And StringInStr($sFunc, "_Func_End(") = 0 Then 0088: 0-0: $sFunc_new = StringRegExpReplace($sFunc, "(?is)(Func )(.*?)(\(.*?\)\r\n)(.*?)(EndFunc.*?\r\n)", "$1$2$3 _Func_Start("$2")" & @CRLF & "$4 _Func_End("$2")" & @CRLF & "$5") 0089: 0-7: $aFuncName = StringRegExp($sFunc_new, "(?i)(?:Func )(.*?)(?:\()", 3) 0090: 0-0: $sFunc_new = StringRegExpReplace($sFunc_new, "(?i)(\r\n)(\s*?)(Return)", @CRLF & "$2_Func_End("" & $aFuncName[0] & "")$1$2$3") 0091: 0-0: $sFunc_new = StringRegExpReplace($sFunc_new, "(?i)(_Func_End.*\r\n\s*?Return.*?)(\r\n\s*_Func_End\(.*?\))", "$1") 0092: 0-0: $sFileContent = StringReplace($sFileContent, $sFunc, $sFunc_new) 0093: 0-1: EndIf 0094: 0-1: Next 0079: 0-1: If StringInStr($sFunc, "Func Intercept_MessageBoxW(") = 0 And StringInStr($sFunc, "Func AddHookApi(") = 0 And StringInStr($sFunc, "Func VirtualProtect(") = 0 And StringInStr($sFunc, "Func ImageDirectoryEntryToData(") = 0 And StringInStr($sFunc, "Func _GetVariablesValue(") = 0 And StringInStr($sFunc, "_Func_Start(") = 0 And StringInStr($sFunc, "_Func_End(") = 0 Then 0088: 0-0: $sFunc_new = StringRegExpReplace($sFunc, "(?is)(Func )(.*?)(\(.*?\)\r\n)(.*?)(EndFunc.*?\r\n)", "$1$2$3 _Func_Start("$2")" & @CRLF & "$4 _Func_End("$2")" & @CRLF & "$5") 0089: 0-7: $aFuncName = StringRegExp($sFunc_new, "(?i)(?:Func )(.*?)(?:\()", 3) 0090: 0-0: $sFunc_new = StringRegExpReplace($sFunc_new, "(?i)(\r\n)(\s*?)(Return)", @CRLF & "$2_Func_End("" & $aFuncName[0] & "")$1$2$3") 0091: 0-0: $sFunc_new = StringRegExpReplace($sFunc_new, "(?i)(_Func_End.*\r\n\s*?Return.*?)(\r\n\s*_Func_End\(.*?\))", "$1") 0092: 0-0: $sFileContent = StringReplace($sFileContent, $sFunc, $sFunc_new) 0093: 0-1: EndIf 0094: 0-1: Next 0079: 0-1: If StringInStr($sFunc, "Func Intercept_MessageBoxW(") = 0 And StringInStr($sFunc, "Func AddHookApi(") = 0 And StringInStr($sFunc, "Func VirtualProtect(") = 0 And StringInStr($sFunc, "Func ImageDirectoryEntryToData(") = 0 And StringInStr($sFunc, "Func _GetVariablesValue(") = 0 And StringInStr($sFunc, "_Func_Start(") = 0 And StringInStr($sFunc, "_Func_End(") = 0 Then 0094: 0-0: Next 0079: 0-0: If StringInStr($sFunc, "Func Intercept_MessageBoxW(") = 0 And StringInStr($sFunc, "Func AddHookApi(") = 0 And StringInStr($sFunc, "Func VirtualProtect(") = 0 And StringInStr($sFunc, "Func ImageDirectoryEntryToData(") = 0 And StringInStr($sFunc, "Func _GetVariablesValue(") = 0 And StringInStr($sFunc, "_Func_Start(") = 0 And StringInStr($sFunc, "_Func_End(") = 0 Then 0094: 0-0: Next 0079: 0-0: If StringInStr($sFunc, "Func Intercept_MessageBoxW(") = 0 And StringInStr($sFunc, "Func AddHookApi(") = 0 And StringInStr($sFunc, "Func VirtualProtect(") = 0 And StringInStr($sFunc, "Func ImageDirectoryEntryToData(") = 0 And StringInStr($sFunc, "Func _GetVariablesValue(") = 0 And StringInStr($sFunc, "_Func_Start(") = 0 And StringInStr($sFunc, "_Func_End(") = 0 Then 0094: 0-0: Next 0079: 0-0: If StringInStr($sFunc, "Func Intercept_MessageBoxW(") = 0 And StringInStr($sFunc, "Func AddHookApi(") = 0 And StringInStr($sFunc, "Func VirtualProtect(") = 0 And StringInStr($sFunc, "Func ImageDirectoryEntryToData(") = 0 And StringInStr($sFunc, "Func _GetVariablesValue(") = 0 And StringInStr($sFunc, "_Func_Start(") = 0 And StringInStr($sFunc, "_Func_End(") = 0 Then 0094: 0-0: Next 0079: 0-0: If StringInStr($sFunc, "Func Intercept_MessageBoxW(") = 0 And StringInStr($sFunc, "Func AddHookApi(") = 0 And StringInStr($sFunc, "Func VirtualProtect(") = 0 And StringInStr($sFunc, "Func ImageDirectoryEntryToData(") = 0 And StringInStr($sFunc, "Func _GetVariablesValue(") = 0 And StringInStr($sFunc, "_Func_Start(") = 0 And StringInStr($sFunc, "_Func_End(") = 0 Then 0094: 0-0: Next 0079: 0-0: If StringInStr($sFunc, "Func Intercept_MessageBoxW(") = 0 And StringInStr($sFunc, "Func AddHookApi(") = 0 And StringInStr($sFunc, "Func VirtualProtect(") = 0 And StringInStr($sFunc, "Func ImageDirectoryEntryToData(") = 0 And StringInStr($sFunc, "Func _GetVariablesValue(") = 0 And StringInStr($sFunc, "_Func_Start(") = 0 And StringInStr($sFunc, "_Func_End(") = 0 Then 0094: 0-0: Next 0095: 0-0: FileMove($fFile, StringReplace($fFile, ".au3", "__VariableList_BackUp.au3")) 0096: 0-0: FileWrite(@ScriptDir & "VariableList_temp.au3", $sFileContent) 0097: 0-0: FileMove(@ScriptDir & "VariableList_temp.au3", $fFile, 1) 0098: 0-0: EndFunc ;==>_FunctionStartStop 0019: 0-0: EndIf 0021: 0-0: Func _ListOfGlobalVariables($fFile) 0070: 0-0: Func _FunctionStartStop($fFile) +>07:14:05 AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 13.194 Link to comment Share on other sites More sharing options...
MHz Posted September 24, 2013 Author Share Posted September 24, 2013 So what you think about this modification ? EDIT 2013/09/22 12:18: add attachment (au3 file) Interesting. It does a kind of snapshot debug method. I do consider that it needs some clean way to implement, by using includes to add to the main script perhaps. All of those Msgboxes could be replaced with some logging to file or something else. I have no liking of the idea of moving the main script around. Especially when I mentioned about missing backslashes. These lines below surprise me as working for me yet I would expect them to concatenate the file name with the parent folder name. I did some small tests with missing backslashes and they do concatenate the file name with the parent folder name so it is deceiving how sometimes it works in an unexpected way at times. FileMove($fFile, StringReplace($fFile, '.au3', '__VariableList_BackUp.au3')) FileWrite(@ScriptDir & 'VariableList_temp.au3', $sFileContent) FileMove(@ScriptDir & 'VariableList_temp.au3', $fFile, 1) If by chance that 1st FileMove fails, then the 2nd can overwrite the original script. That could be worth putting some condition testing in to avoid this possiblity. I did see the AutoIt Error window and it is a nice idea how you use the awesome code from trancexx to handle this. You score well for implementing this idea. You certainly bring up some ideas with this code that you have presented. ThankYou Link to comment Share on other sites More sharing options...
mLipok Posted September 24, 2013 Share Posted September 24, 2013 Interesting. It does a kind of snapshot debug method. Ultimately, in the future, I wonder about the creature, a separate thread, with a separate full / complete solution for debugging.With examples and all possible means I have known debugging. I have no liking of the idea of moving the main script around. Especially when I mentioned about missing backslashes. These lines below surprise me as working for me yet I would expect them to concatenate the file name with the parent folder name. I did some small tests with missing backslashes and they do concatenate the file name with the parent folder name so it is deceiving how sometimes it works in an unexpected way at times. FileMove($fFile, StringReplace($fFile, '.au3', '__VariableList_BackUp.au3')) FileWrite(@ScriptDir & 'VariableList_temp.au3', $sFileContent) FileMove(@ScriptDir & 'VariableList_temp.au3', $fFile, 1)If by chance that 1st FileMove fails, then the 2nd can overwrite the original script. That could be worth putting some condition testing in to avoid this possiblity. Good point.I'll take care of it. I did see the AutoIt Error window and it is a nice idea how you use the awesome code from trancexx to handle this. You score well for implementing this idea. I have a lot of interesting solutions.But you have to wait for the "full / complete solution for debugging" You certainly bring up some ideas with this code that you have presented. ThankYou I hope that any ideas will have your results in this thread Best regards mlipok ps. Obviously, any further suggestions are welcome. Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
mLipok Posted September 24, 2013 Share Posted September 24, 2013 I do consider that it needs some clean way to implement, by using includes to add to the main script perhaps. Good idea I'll try to implement it today. I do consider that it needs some clean way to implement, by using includes to add to the main script perhaps. All of those Msgboxes could be replaced with some logging to file or something else. As you may have noticed the idea to develop.Of course I meant to add any kind of parameterization.But it takes time.Of course, any suggestions are welcome.Because as we all know, it is best first to gather comments and suggestions, and then immediately do the job the right way, or at least I think so. Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
mLipok Posted September 29, 2013 Share Posted September 29, 2013 (edited) I made a new version, but as I said I made a new thread. You can find them here: '?do=embed' frameborder='0' data-embedContent>> Best regards mlipok Edited October 2, 2013 by mlipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now