MrCreatoR Posted April 10, 2010 Share Posted April 10, 2010 (edited) This UDF allows to highlight AutoIt v3 syntax code to html/bbcode format.Note: As strange as it might sound, this UDF written on pure AutoIt (even includes are not used), and since this UDF uses a lot of RegExp, i had to add a RegExp debugging system. To enable this system you should set «1» for the following variables in library file (AutoItSyntaxHighlight.au3) under the #Region Global Variables: Removed starting from version 1.1 Global $fAu3SH_Debug_RE_Patterns = True ; Enable regular expression debugging system Global $fAu3SH_Debug_RE_WriteLog = True ; Will write a log-file for debugging data (at the end of each syntax highlighting process) There is also a Global option to define if the functions/keywords should be linked to online documentation: $AU3SH_ADD_URLS = 1 ; Will add links to highlighted Functions/Keywords Example: Spoiler expandcollapse popup#include <Au3SyntaxHighlight.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> $AU3SH_ADD_URLS = 1 $sInitDir = '' $sFilter = '*.au3' $sMRUList = RegRead('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\au3', 'MRUList') $sLastFileOpenPath = RegRead('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\au3', StringLeft($sMRUList, 1)) If Not FileExists($sLastFileOpenPath) Then $sInitDir = @ScriptDir $sFilter = 'Test Script.au3' EndIf $sFile = FileOpenDialog('Open Au3 Script File', $sInitDir, 'AutoIt Script (' & $sFilter & ')') If @error Then Exit $sAu3Code = FileRead($sFile) $sAu3Syntax_HighlightedCode = _Au3_SyntaxHighlight_Proc($sAu3Code, 0) $sTmp_File = @TempDir & '\Au3_HighlightSyntax.htm' $hFile = FileOpen($sTmp_File, 2) FileWrite($hFile, $sAu3Syntax_HighlightedCode) FileClose($hFile) _IEErrorHandlerRegister() $oIE = _IECreateEmbedded() $iGUI_Width = @DesktopWidth - 40 $iGUI_Height = @DesktopHeight - 150 $hGUI = GUICreate('AutoIt Syntax Highlighter [' & $sFile & ']', $iGUI_Width, $iGUI_Height, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) GUICtrlCreateObj($oIE, 10, 20, $iGUI_Width - 20, $iGUI_Height - 70) $iBack_Bttn = GUICtrlCreateButton('Back', 10, $iGUI_Height - 40, 100, 30) $iForward_Bttn = GUICtrlCreateButton('Forward', 120, $iGUI_Height - 40, 100, 30) $iHome_Bttn = GUICtrlCreateButton('Home', 230, $iGUI_Height - 40, 100, 30) $iStop_Bttn = GUICtrlCreateButton('Stop', 340, $iGUI_Height - 40, 100, 30) GUISetState(@SW_SHOW, $hGUI) _IENavigate($oIE, $sTmp_File) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete($hGUI) Exit Case $iHome_Bttn _IENavigate($oIE, $sTmp_File) Case $iBack_Bttn _IEAction($oIE, 'back') Case $iForward_Bttn _IEAction($oIE, 'forward') Case $iStop_Bttn _IEAction($oIE, 'stop') EndSwitch WEnd UDF Header: Spoiler ; #FUNCTION# ==================================================================================================== ; Name...........: _Au3_SyntaxHighlight ; Description....: Allows to highlight AutoIt v3 syntax to html/bbcode format. ; Syntax.........: _Au3_SyntaxHighlight($sAu3Code [, $iOutput = -1]) ; Parameters.....: $sAu3Code - AutoIt v3 plain code. ; $iOutput - [Optional] Sets the output format: ; -1 - (Default) Return CSS classes header and the AutoIt Syntax Highlighted code as string (wrapped with code tags) ; 1 - Return CSS classes header and AutoIt Syntax Highlighted code as array, where... ; [0] = CSS styles. ; [1] = AutoIt Syntax Highlighted code. ; 2 - Return the result as Html formatted string. ; 3 - Return the result as BBCode formatted string (html tags replaced with bbcode tags). ; ; Return values..: Success - Returns AutoIt Syntax Highlighted code (see $iOutput parameter above for more details). ; Failure - Sets @error to: ; 1 - The $sAu3Code is empty string. ; -1 - The process is aborted by user parameter $AU3SH_HIGHLIGHT_ABORT, and the return value is the original $sAu3Code. ; 2 - Keywords or styles file not found (check the @ScriptDir & "\Resources"). ; ; Author.........: G.Sandler (a.k.a (Mr)CreatoR), www.creator-lab.ucoz.ru, www.autoit-script.ru ; Modified.......: ; Remarks........: *Idea* based on similar old project: http://www.autoitscript.com/forum/index.php?showtopic=34236 ; Related........: ; Link...........: ; Example........: Yes (see #Region Header). ; =============================================================================================================== Current Library Version: 1.2AutoIt Support Version: v3.3+, Developed/Tested on Win XP Rus (Service Pack 3) / Win 7 RusScreenshot:Credits: Spoiler amel27 Change Log: Spoiler [1.2] + Added Keywords and API multi files support ($AU3SH_KEYWORDS_FILE and $AU3SH_API_FILE can contain more than one file path, delimited with + Added $AU3SH_KEYWORDS_FUNCS/UDFS/KWRDS/MACROS/PREPROC/SPECIAL/SNDKEYS user variables to set properties keys to be read from $AU3SH_KEYWORDS_FILE files. (can be delimited with ; to set multiple keys (first found will be used)) * Fixed send keys highlighting. * Fixed highlighting strings that is used as unique strings to replace strings (such as '%@~@%'). [1.1] @THIS IS SCRIPT BREAKING VERSION@ * $iAu3SH_AddURLs renamed to $AU3SH_ADD_URLS. * $iAu3SH_AbortHighlight renamed to $AU3SH_HIGHLIGHT_ABORT. ATTENTION: If this is set to True, then it's should be reset to False after the "_Au3_SyntaxHighlight" function returns. + Added new user variables to set urls when using $AU3SH_ADD_URLS: $AU3SH_FUNCS_URL, $AU3SH_UDFS_URL, $AU3SH_KEYWORDS_URL, $AU3SH_MACROS_URL, $AU3SH_PREPROC_URL. + Added $AU3SH_KEYWORDS_FILE user variable to specify path to au3.keywords.properties file, if not found used one from Resources dir (can be outdated). + Added $AU3SH_API_FILE user variable to specify path to au3.api file, if not found used one from Resources dir (can be outdated). * _Au3_SyntaxHighlight_Proc renamed to _Au3_SyntaxHighlight. * Function names was shorten. * Speed optimization. - Removed debug system ($fAu3SH_Debug_RE_Patterns and $fAu3SH_Debug_RE_WriteLog also have been removed). [1.0] * Speed optimization. [0.9] + Compatibility with AutoIt 3.3.12.0. + Added "Add missing keywords.au3" script to add missing keywords from new AutoIt version. * $iDebug_RegExp_Patterns user global variable renamed to $fAu3SH_Debug_RE_Patterns. * $iDebug_RegExp_WriteLog user global variable renamed to $fAu3SH_Debug_RE_WriteLog. * Examples changed. [0.8] * Fixed bug with highlighting variables inside special keywords (#region, #forceref etc.). [0.7] * Fixed issue with wrong parsing when Add Urls option is enabled. [0.6] + Compatibility with AutoIt 3.3.8.1. * Fixed issue with wrong restored strings. * Fixed bug with not proper UDF naming for url (UDFs links does not recognized due to not proper case, i.e: _stringrepeat instead of _StringRepeat). [0.5] * Fixed bug with highlighting literal strings inside comment blocks. * Fixed few issues with highlighting special keywords. [0.4] * Fixed bug with (re)highlighting keywords and functions inside COM object methods. * Docs updated. [0.3] * Fixed bug when strings and send keys was highlighted inside commented lines. * Few optimizations to the code. [0.2] + Added Global parameter ($iAu3SH_AbortHighlight) to abort the highlighting process (break the function execution). - If this variable set to 1, the function will return the original Au3 Code and set @error to -1. + Added "#White space" style support (now you can set it in the au3.styles.properties file). + Added "#Background" style support, used only for highlighting with Html tags mode (now you can set it in the au3.styles.properties file). * Styles header classes renamed with "au3_" prefix. * Fixed bug with highlighting COM objects. * Fixed bug with highlighting keywords inside variables. * Fixed bug with highlighting more than one preprocessor when instead of <Include.au3> used double/single qoutes ("Include.au3"). * Fixed bug with highlighting commented lines/comment blocks inside literal strings. * Fixed bug with not (properly) highlighting commented lines. * Fixed issue with converting to BBCode format. * Now the PreProcessor and Special keywords are correctly highlighted (all included tags removed). [0.1] * First public release. Attachments: AutoItSyntaxHighlight_1.2.zip AutoItSyntaxHighlight_1.1.zipAutoItSyntaxHighlight_1.0.zipAutoItSyntaxHighlight_0.9.zipAutoItSyntaxHighlight_0.8.zipAutoItSyntaxHighlight_0.7.zipAutoItSyntaxHighlight_0.6.zipAutoItSyntaxHighlight_0.5.zipAutoItSyntaxHighlight_0.4.zipAutoItSyntaxHighlight_0.3.zipAutoItSyntaxHighlight_0.2.zipAutoItSyntaxHighlight_0.2.zipAutoItSyntaxHighlight.zip AutoItSyntaxHighlight_1.1.zip AutoItSyntaxHighlight_1.2.zip Edited February 20, 2021 by MrCreatoR Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
Shafayat Posted April 11, 2010 Share Posted April 11, 2010 Magnificent! Keep up the good work. [Not using this account any more. Using "iShafayet" instead] Link to comment Share on other sites More sharing options...
ptrex Posted April 11, 2010 Share Posted April 11, 2010 @MrCreatoR Very usefull ! Thanks rgds, ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
MrCreatoR Posted July 24, 2010 Author Share Posted July 24, 2010 (edited) New version... [0.2] + Added Global parameter ($iAu3SH_AbortHighlight) to abort the highlighting process (break the function execution). If this variable set to 1, the function will return the original Au3 Code and set @error to -1. + Added "#White space" style support (now you can set it in the au3.styles.properties file). + Added "#Background" style support, used only for highlighting with Html tags mode (now you can set it in the au3.styles.properties file). * Styles header classes renamed with "au3_" prefix. * Fixed bug with highlighting COM objects. * Fixed bug with highlighting keywords inside variables. * Fixed bug with highlighting more than one preprocessor when instead of <Include.au3> used double/single qoutes ("Include.au3"). * Fixed bug with highlighting commented lines/comment blocks inside literal strings. * Fixed bug with not (properly) highlighting commented lines. * Fixed issue with converting to BBCode format. * Now the PreProcessor and Special keywords are correctly highlighted (all included tags removed). Please check the first post. Edited July 24, 2010 by MrCreatoR Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
MrCreatoR Posted July 26, 2010 Author Share Posted July 26, 2010 And one more update:v0.3* Fixed bug when strings and send keys was highlighted inside commented lines.* Few optimizations to the code. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
Andreik Posted July 26, 2010 Share Posted July 26, 2010 Very usefull UDF. Thanks for sharing with us. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
MrCreatoR Posted April 27, 2011 Author Share Posted April 27, 2011 Update: [0.4] * Fixed bug with (re)highlighting keywords and functions inside COM object methods. * Docs updated. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
JScript Posted April 27, 2011 Share Posted April 27, 2011 @MrCreatoR, Very good! I'll add on a project to examine and run scripts remotely... Thanks! http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
Mikeman27294 Posted July 19, 2011 Share Posted July 19, 2011 Awesome little program!!! Link to comment Share on other sites More sharing options...
Mikeman27294 Posted July 23, 2011 Share Posted July 23, 2011 You know what would make this more interesting? Would be to set it so that you load it into a rich editbox and it does all of the highlighting in there (without writing to the file), instead of being saved as an html file. What do you think? or do you think that it would be too slow? Link to comment Share on other sites More sharing options...
Skitty Posted August 6, 2011 Share Posted August 6, 2011 This is great! except its turning things like Global $iAu3SH_MDV_Opt = Opt("MustDeclareVars", 1) into Global $iAu3SH_MDV_Opt = Opt(%@~@%28036.3157074722, 1)how do I fix that? Link to comment Share on other sites More sharing options...
Zedna Posted September 6, 2011 Share Posted September 6, 2011 Nice! Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
MrCreatoR Posted August 7, 2012 Author Share Posted August 7, 2012 Update. [0.5] * Fixed bug with highlighting literal strings inside comment blocks. * Fixed few issues with highlighting special keywords. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
Danyfirex Posted August 9, 2012 Share Posted August 9, 2012 (edited) Hi Mate I love this work.I got a Wrong output with this code.Normal#cs ------------------------------------------------------- AutoIt Version: 3.3.8.1 Author..........: dany Script Function...: Dir "Retorna la Ruta sin el nombre del Archivo Uso..............: Dir("C:\Windows\System32\Dismes-ESMsiProvider.dll.mui") Retorna "C:\Windows\System32\Dismes-ES" #ce ------------------------------------------------------- ;Ejemplo $ruta="C:\Windows\System32\Dismes-ESMsiProvider.dll.mui" msgbox(0,"C:\Windows\System32\Dismes-ES",Dir($ruta)) ;Funcion Dir func Dir($path) local $delimiter="" $array =StringSplit($path,$delimiter) $len=UBound($array)-1 $numero= $len-1 $num=StringInStr($path,$delimiter,0,$numero) $dir=StringMid($path,1,$num) return $dir EndFuncWith your software change my variable $delimiter#cs -------------------------------------------------------AutoIt Version: 3.3.8.1Author..........: danyScript Function...: Dir "Retorna la Ruta sin el nombre del ArchivoUso..............: Dir("C:\Windows\System32\Dismes-ESMsiProvider.dll.mui") Retorna "C:\Windows\System32\Dismes-ES"#ce -------------------------------------------------------;Ejemplo$ruta="C:\Windows\System32\Dismes-ESMsiProvider.dll.mui"msgbox(0,"C:\Windows\System32\Dismes-ES",Dir($ruta));Funcion Dirfunc Dir($path)local $delimiter="C:\Windows\System32\Dismes-ESMsiProvider.dll.mui"$array =StringSplit($path,$delimiter)$len=UBound($array)-1$numero= $len-1$num=StringInStr($path,$delimiter,0,$numero)$dir=StringMid($path,1,$num)return $dirEndFunc Edited August 9, 2012 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
MrCreatoR Posted August 10, 2012 Author Share Posted August 10, 2012 I got a Wrong output with this code.Fixed, please check the first post Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
Danyfirex Posted August 10, 2012 Share Posted August 10, 2012 Fixed, please check the first post Simply Amazing MrCreatoR thank you so much Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
MrCreatoR Posted August 10, 2012 Author Share Posted August 10, 2012 Simply Amazing MrCreatoR thank you so muchAnd thank you for revealing this bug, it is strange that this haven't been noticed before by others. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
JavaScript_Freek Posted August 14, 2012 Share Posted August 14, 2012 Looking pretty good. I like this! :-) [center]Cookyx.com :: Simple LAN Chat[/center] Link to comment Share on other sites More sharing options...
Danyfirex Posted August 17, 2012 Share Posted August 17, 2012 (edited) hi mate it's me again reporting another bug when I use in this code.I use so much you usefull tool where my registry keys are, I put some comment line with the problem.maybe for next version you can add size-type font. it's only a suggestion.Thank you Again for you great tool MrCreatoRexpandcollapse popup#cs ------------------------------------------------------- AutoIt Version: 3.3.8.1 Author..........: Danyfirex Script Function...: ListarRun Uso..............: $Listar=listarRun() Retorna : Lista las Claves Run en un Array #ce ------------------------------------------------------- ;Ejemplo #include $Listar=listarRun() _ArrayDisplay($Listar,"Funcion Listar Runs") Func listarRun() local $valor Select Case @OSArch="X64" Local $clave[3] local $Array Local $split local $XD =1 $clave[0]="HKLM64SoftwareMicrosoftWindowsCurrentVersion Run";here Make me one space in my string "Run" $clave[1]="HKLMSoftwareMicrosoftWindowsCurrentVersionRu n";here Make me one space in my string"Run" $clave[2]="HKCUSoftwareMicrosoftWindowsCurrentVersionRu n";here Make me one space in my string "Run" for $a=0 to 2 For $i = 1 To $XD Local $var = RegEnumVal($clave[$a], $i) if _RegExist($clave[$a],$var) Then $valor=RegRead($clave[$a],$var) $clavereg=StringSplit($clave[$a],"") $Array&=($clavereg[1] & " - Run: " &"[" & $var& "] - " & $valor)&@CR $XD+=1 EndIf Next next $split=stringsplit($Array,@CRLF) ReDim $split[UBound($split)-1] return $split Case @OSArch="X86" local $clave2[2] local $Array local $split local $XD =1 $clave2[0]="HKLMSoftwareMicrosoftWindowsCurrentVersionRu n" ;here Make me one space in my string "Run" $clave2[1]="HKCUSoftwareMicrosoftWindowsCurrentVersionRu n" ;here Make me one space in my string "Run" for $a=0 to 1 For $i = 1 To $XD Local $var = RegEnumVal($clave2[$a], $i) if _RegExist($clave2[$a],$var) Then $valor=RegRead($clave2[$a],$var) $clavereg=StringSplit($clave2[$a],"") $Array&=($clavereg[1] & " - Run: " &"[" & $var& "] - " & $valor)&@CR $XD+=1 EndIf Next next $split=stringsplit($Array,@CRLF) ReDim $split[UBound($split)-1] return $split EndSelect EndFunc Func _RegExist($sKeyName, $sValueName) RegRead($sKeyName, $sValueName) Return @error = 0 EndFunc Edited August 17, 2012 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
MrCreatoR Posted August 17, 2012 Author Share Posted August 17, 2012 (edited) I am not sure that i understand the bug... Edited August 17, 2012 by MrCreatoR Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team 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