pandel Posted June 26, 2013 Share Posted June 26, 2013 (edited) Hi! I wrote a small editor for another project that uses Scintilla with a custom lexer as editor component. Everything, including the lexer (styling and folding) is written in AutoIt in a way that it can be easily integrated into other projects. The archive contains everything neccessary: the compiled editor, complete source code, form definitions, external libraries, etc.. Certainly, everything written by someone else is documented, either in authors.txt in the "Libs" folder or as comments in the source itself. The lexer is mainly designed to be used with script languages (SGML-like languages won't work really well) and can be customized via its own menu item. You can add your own additional script language definitions as well. There are already some lexer definitions, test scripts and a small example, how to integrate the editor component into a different project (mainly only 4 lines of code) in the archive. See _LexingUDF_example.au3. When you start the editor it runs in german without any default lexer selected, so if you would like to start in english and with AutoIt lexing enabled, call it this way: 'scripteditor.exe -l=en -x=autoit' Apart from that you can go to 'Lexer' menu and choose one from the list. You can take a look at every command line parameter with '-h' Screenshot (ok, in german, yet I think you will understand): Download: ScriptEditor v1.9 A short description how to integrate the component into another project (for a closer look, see _LexingUDF_example.au3): ; 0.) we need the whole content of the archive, so extract everything, delete editor.au3 and start coding ;-) #include "_LexingUDF.au3" ; at first the parent GUI needs to be created, we need the control id (in this example $hGUI) ; 1.) now set the parent GUI for the new editor component $__default_editor_parent = $hGUI ; 2.) load a lexer definition - name of the file without .def extension from 'LexDef' folder _GUICtrlLex_ReadLEXFile($lexer) -> ie: _GUICtrlLex_ReadLEXFile("autoit") ; 3.) create editor component within $__default_editor_parent _GUICtrlLex_CreateScriptEditor($x, $y, $width, $height) -> ie: _GUICtrlLex_CreateScriptEditor(0, 0, 800, 600) ; 4.) initialize necessary variables, arrays, etc. and apply the styles, layout defaults, marker definitions, etc. which have been loaded before to the editor _GUICtrlLex_SetupStylingAndFolding() ; this is it.... for everyone who wants to have a nice menu with every existing lexer definition and a ; menu point to customize things, as shown in the screenshot, adds the following: ; (advice: use OnEvent mode to ease things) ; 5.) create a separate 'Lexer' main menu entry with everthing needed _GUICtrlLex_CreateLexerDefMenu('main') ; 6.) connect the menu item created in 5.) with the configuration dialog GUICtrlSetOnEvent($__arM[2], "_GUICtrlLex_OpenLexerDef") ; IMPORTANT: if you need to register your own WM_COMMAND or WM_NOTIFY routines, use ; _GUIRegisterMsg from _GUIRegisterMsg.au3 !!! Really nice is that you can change the lexer definition, colors, fonts, etc. and if you click on 'Save' everything will be applied immediately so that you can see what happens. Try it with the test scripts ;-) To be fair, I have to admit, that the editor is too slow for big scripts - it's running in AutoIt speed . But as speed wasn't important for me, because I wanted to handle small scripts with my own special lexing, it was ok for me. So please don't blame me for the fact, that your 8000 lines of code script won't get styled and folded really fast ;-) Also, there might be still some bugs in it and I don't really know how smart my way of coding is (especially the folding algorithm , perhaps a rewrite it from scratch), because I'm still quite new to AutoIt, but it was fun to do ;-) and it works for me. Perhaps someone likes it , it is meant as a contribution to a very informative forum ! Regards, Holger Edited March 2, 2017 by pandel GreenCan and mLipok 2 ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
czardas Posted June 27, 2013 Share Posted June 27, 2013 (edited) Nice - you obviously put a lot of effort into this. I found a bug. Instead of typing capital letter S, Shift + S triggers a save dialogue on my PC. Edited June 27, 2013 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
GreenCan Posted June 27, 2013 Share Posted June 27, 2013 Hi Holger, This is a very promising script. I look forward seeing more of this. Thanks I noticed a few issues while running your script a first time 1. Escaping from Find quits the editor if nothing was changed or triggers the save gui if something was edited. 2. line and column do not update if I start typing in a new script, while if I load a file, there is no issue 3. Save as doesn't present the file name of a loaded document as default file name. _LexingUDF_example.au3 crashed when changing a color because you omitted #include <Misc.au3> (easy fixed) In both scripts, there are some warning messages but also a number of errors that look worrying (undefined function?) Great job so far GreenCan Contributions CheckUpdate - SelfUpdating script ------- Self updating script Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple MsgBox with CountDown ------------------- MsgBox with visual countdown Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV) USB Drive Tools ------------------------------ Tool to help you with your USB drive management Input Period udf ------------------------------ GUI for a period input Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette Excel Chart UDF ----------------------------- Collaboration project with water GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm TaskListAllDetailed --------------------------- List All Scheduled Tasks Computer Info --------------------------------- A collection of information for helpdesk Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only) Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane Oracle SQL Report Generator ------------- Oracle Report generator using SQL SQLite Report Generator ------------------- SQLite Report generator using SQL SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access Animated animals ----------------------------- Fun: Moving animated objects Perforated image in GUI --------------------- Fun: Perforate your image with image objects UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool Visual Image effect (GUI) -------------------- Visually apply effects on an image Link to comment Share on other sites More sharing options...
guinness Posted June 27, 2013 Share Posted June 27, 2013 Cool, one of my functions is used.You could parse the file using regular expressions. Why not have a look at Beege's UDF? '?do=embed' frameborder='0' data-embedContent>> UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
guinness Posted June 27, 2013 Share Posted June 27, 2013 I just tried to run you Lexer Example and there are many syntax errors that need fixing. Simply ignoring Au3Check won't stop the script for displaying a syntax error. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
pandel Posted June 27, 2013 Author Share Posted June 27, 2013 (edited) Hi! Thanks for your feedback! The Shift-S error is fixed now. see new download.... @GreenCan1) Strange, doesn't happen here. But I'll look into it...2) I see. I'll try to fix it!3) Ok, I add the include to _LexerUDF_au3, because I want to have everys necessary include in just one file.Many thanks for that! @guinnessYes, many thanks for your ListView function, it's great! Did you take a look at _GUICtrlLex_StyleIt()? I do use regular expressions, but not always. Not to use them too often is simply what came out when I tried to optimize speed.And please tell me, which syntax errors did you find? I'll fix them as soon as possible... If there are sooo many, post as screenshot please ;-)EDIT - regarding any errors: I didn't care about checking every external library if they were error free, as I don't want to alter them. The functions I use DO work as expected and that's it. It there are errors in the libs in functions I don't use, I don't really care. Should I? Edited June 27, 2013 by pandel ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
guinness Posted June 27, 2013 Share Posted June 27, 2013 Running in SciTE will display them in the console. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
pandel Posted June 27, 2013 Author Share Posted June 27, 2013 @GreenCan 1,2,3 should be fixed, hopefully.... ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
pandel Posted June 27, 2013 Author Share Posted June 27, 2013 (edited) @guinness:I did take a screenshot, so that you can see that I don't get any errors when I run the example. Perhaps you can see, what's wrong? ... and I took a look at the UDF you mentioned. Really nice approach and tricky regex (RegEx and me aren't the best friends ;-) ), but my intent was to do the whole thing from a general point of view, not only AutoIt. Edited June 27, 2013 by pandel ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
guinness Posted June 27, 2013 Share Posted June 27, 2013 OK, I will have a look again. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
GreenCan Posted June 27, 2013 Share Posted June 27, 2013 @GreenCan 1,2,3 should be fixed, hopefully.... Looks good! For your list of enhancements, a file drag and drop in the editor would be beneficial for user comfort... Keep going. Contributions CheckUpdate - SelfUpdating script ------- Self updating script Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple MsgBox with CountDown ------------------- MsgBox with visual countdown Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV) USB Drive Tools ------------------------------ Tool to help you with your USB drive management Input Period udf ------------------------------ GUI for a period input Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette Excel Chart UDF ----------------------------- Collaboration project with water GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm TaskListAllDetailed --------------------------- List All Scheduled Tasks Computer Info --------------------------------- A collection of information for helpdesk Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only) Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane Oracle SQL Report Generator ------------- Oracle Report generator using SQL SQLite Report Generator ------------------- SQLite Report generator using SQL SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access Animated animals ----------------------------- Fun: Moving animated objects Perforated image in GUI --------------------- Fun: Perforate your image with image objects UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool Visual Image effect (GUI) -------------------- Visually apply effects on an image Link to comment Share on other sites More sharing options...
jaberwacky Posted June 28, 2013 Share Posted June 28, 2013 Should be: AutoIt3Wrapper_Run_AU3Check=y Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
guinness Posted June 28, 2013 Share Posted June 28, 2013 I was talking about the _LexingUDF.au3, if you use Au3Check (Ctrl+F5) you will see you're calling functions with missing parameters and using variables that don't exist. expandcollapse popup"..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(166,55) : ERROR: GUICtrlCreateMenuItem() [built-in] called with wrong number of args. Local $__mLexer = GUICtrlCreateMenuItem(__("&Lexer")) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(532,63) : WARNING: $lstKeywords: possibly used before declaration. _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($lstKeywords) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(533,60) : WARNING: $lstFolds: possibly used before declaration. _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($lstFolds) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(534,61) : WARNING: $lstStyles: possibly used before declaration. _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($lstStyles) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(535,27) : WARNING: $chkStyling: possibly used before declaration. _HLP_CheckSet($chkStyling, ~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(536,29) : WARNING: $chkVarNested: possibly used before declaration. _HLP_CheckSet($chkVarNested, ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(537,32) : WARNING: $chkSysVarNested: possibly used before declaration. _HLP_CheckSet($chkSysVarNested, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(538,31) : WARNING: $chkConstNested: possibly used before declaration. _HLP_CheckSet($chkConstNested, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(539,27) : WARNING: $chkFolding: possibly used before declaration. _HLP_CheckSet($chkFolding, ~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(540,31) : WARNING: $chkFoldComment: possibly used before declaration. _HLP_CheckSet($chkFoldComment, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(541,31) : WARNING: $chkFoldCompact: possibly used before declaration. _HLP_CheckSet($chkFoldCompact, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(542,30) : WARNING: $chkIncComLine: possibly used before declaration. _HLP_CheckSet($chkIncComLine, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(543,31) : WARNING: $chkIncSections: possibly used before declaration. _HLP_CheckSet($chkIncSections, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(545,29) : WARNING: $rdSectYes: possibly used before declaration. GUICtrlSetState($rdSectYes, ~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(546,33) : WARNING: $inputSectOpen: possibly used before declaration. GUICtrlSetState($inputSectOpen, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(547,34) : WARNING: $inputSectClose: possibly used before declaration. GUICtrlSetState($inputSectClose, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(550,28) : WARNING: $rdSectNo: possibly used before declaration. GUICtrlSetState($rdSectNo, ~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(555,38) : WARNING: $inputLexerFileFilter: possibly used before declaration. GUICtrlSetData($inputLexerFileFilter, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(556,32) : WARNING: $inputLexerDesc: possibly used before declaration. GUICtrlSetData($inputLexerDesc, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(557,31) : WARNING: $inputOperator: possibly used before declaration. GUICtrlSetData($inputOperator, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(558,29) : WARNING: $inputBraces: possibly used before declaration. GUICtrlSetData($inputBraces, ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(559,40) : WARNING: $inputSingleLineComment: possibly used before declaration. GUICtrlSetData($inputSingleLineComment, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(560,34) : WARNING: $inputLeadingChar: possibly used before declaration. GUICtrlSetData($inputLeadingChar, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(563,27) : WARNING: $inputQuot: possibly used before declaration. GUICtrlSetData($inputQuot, ~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(564,26) : WARNING: $inputApo: possibly used before declaration. GUICtrlSetData($inputApo, ~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(565,40) : WARNING: $inputCharsForVariables: possibly used before declaration. GUICtrlSetData($inputCharsForVariables, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(566,30) : WARNING: $inputVarMark: possibly used before declaration. GUICtrlSetData($inputVarMark, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(567,33) : WARNING: $inputVarEndMark: possibly used before declaration. GUICtrlSetData($inputVarEndMark, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(568,33) : WARNING: $inputSysvarMark: possibly used before declaration. GUICtrlSetData($inputSysvarMark, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(569,36) : WARNING: $inputSysvarEndMark: possibly used before declaration. GUICtrlSetData($inputSysvarEndMark, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(570,32) : WARNING: $inputConstMark: possibly used before declaration. GUICtrlSetData($inputConstMark, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(571,35) : WARNING: $inputConstEndMark: possibly used before declaration. GUICtrlSetData($inputConstEndMark, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(572,36) : WARNING: $inputBlockComments: possibly used before declaration. GUICtrlSetData($inputBlockComments, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(674,24) : WARNING: $frmLexDef: possibly used before declaration. WinSetTitle($frmLexDef, ~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(694,30) : WARNING: $tab: possibly used before declaration. _GUICtrlTab_SetCurFocus($tab, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(750,44) : WARNING: $cmbLanguage: possibly used before declaration. _GUICtrlComboBox_SetCurSel($cmbLanguage, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\Forms\lexdef.isf"(173,37) : ERROR: _saveLexerDef(): undefined function. GUICtrlSetOnEvent(-1,"_saveLexerDef") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\Forms\lexdef.isf"(175,38) : ERROR: _closeLexerDef(): undefined function. GUICtrlSetOnEvent(-1,"_closeLexerDef") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "..\ScriptEditorv15\ScriptEditor - Forums Release\_LexingUDF.au3"(2109,80) : ERROR: _ChooseColor(): undefined function. Local $color = _ChooseColor(2, "0x" & GUICtrlRead($inputStText), 2, $frmLexDef) UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
guinness Posted June 28, 2013 Share Posted June 28, 2013 Yes, many thanks for your ListView function, it's great! Did you take a look at _GUICtrlLex_StyleIt()? I did, but I only saw 1. I also believe you can greatly increase the parsing speed by doing away with so many _ArraySearches. (?i:^0x[[:xdigit:]]+$) ; Slightly optimised. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
pandel Posted June 28, 2013 Author Share Posted June 28, 2013 Ah, I see! Many thanks! 1) Regarding the "possibly used before declaration." warnings: I never really care about those kinds of warnings, because I know that they result from the fact that I put the complete form design into a separate include, which is not loaded at the top of the file, but in _GUICtrlLex_CreateLexerDefForm, so that I can create and delete the form as often as I like. If you take a look at lexdef.isf you'll see that every field is declarated correctly. 2) _ChooseColor: corrected by includeing Misc.au3 3) GUICtrlCreateMenuItem... : corrected in next version 4) _saveLexerDef and _closeLexerDef: not used anymore and deleted So I'll correct everything for the next version, BUT not the WARNINGS (see 1). Those warnings are obviously totally unnecessary! RegEx: I don't use it so much for styling, that's right, but I use them in the folding function for non-whitespace character recognition 'S', and that is called very often. You can see what's happening if you uncomment the _HLP_Debug lines in FoldIt and StyleIt and set the $__HLP_Debug variable to true. But don't forget to uncomment those lines in those two functions again!! If you set the debug var to false, the _HLP_Debug routine is called and returns immediately, BUT just those simple calls and returns significantly slow down the whole process. So commenting out the debug lines is absolutely necessary! At least for me... _ArraySearch: They are mainly in the folding function. What do you mean by? Is it an alternative for ArraySearch? (?i:^0x[[:xdigit:]]+$) ; Slightly optimised. If so, how do you exchange an _ArraySearch [like ie _ArraySearch($__arFolding, $ch, -1, -1, 0, 0, 0, 0) ] call with this construct? ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
guinness Posted June 28, 2013 Share Posted June 28, 2013 That regular expression was to replace your check for 0x0FF00F values. I'm glad you fixed the errors and about the warnings, that's your design, but it's something we don't ignore in the AutoIt UDFs. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
pandel Posted June 28, 2013 Author Share Posted June 28, 2013 That regular expression was to replace your check for 0x0FF00F values. I'm glad you fixed the errors and about the warnings, that's your design, but it's something we don't ignore in the AutoIt UDFs. Ok, understand, thanks and yes, I'm always happy when I can fix a nasty bug ;-)! About the warnings, that's interesting. What do you think that I should do? Define them as a general include BEFORE defining the forms? I mean in an extra, mmhh, global_var.au3 or so? ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
guinness Posted June 28, 2013 Share Posted June 28, 2013 I tend to stay away from Global variables if I can, but in this case define them as Global at the top of the Lexer UDF. Personally I would pass them as parameters, but then again with your UDF it would require a little bit of re-tweaking. Here is another way >I suggested for passing multiple values. It's what I've adopted for my Binary UDF. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
pandel Posted June 28, 2013 Author Share Posted June 28, 2013 I understand and I think I get your point. And if we talk about normal function parameters and returns (normaly just a few), ok. But I find it rather difficult to stay away from global vars if we talk about forms with many controls. When I look at my lexdef form, I don't really have a smart idea how to pass the whole set of controls. Perhaps, I could add them to an array or a hash and pass them all at once... got to think about it... ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
guinness Posted June 28, 2013 Share Posted June 28, 2013 (edited) I just posted >this after our discussion today. How many controls do you need in total? Edited June 28, 2013 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 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