l3ill Posted December 12, 2013 Share Posted December 12, 2013 (edited) This is a little project I started knowing it was over my head to intentionally raise my own experience bar. Pretty Simple Concept and its finally working like I want it to. The Basic Idea: An exe you copy into your Snippet folder and run from there with a shortcut ( or w/out ). Top Part of GUIGet Files - Creates a ListView of all au3 file in the WorkingDir ~ >_RecFileListToArray Thanks M23 !!Clear - clears last search otherwise new search/GetFiles is appended (gets full quick)File Search - search through the WorkingDir for a Keyword ~ >_FindInFile Thanks guinness !! Far Right is a label with the Path of your Working Directory Bottom Part All of these commands work with The Selected File Path From top part:Text Search - searches though preview window for text like F3 (find next) Thanks M23 !!Open in SciTE - Duh...Preview - Shows Preview of Selected File Path in Bottom window with Syntax Hi Liting ~ >RESH Thanks BeegeThrow String - Experimental, Sends Selected Text to last Cursor Position in active tab in SciTE (now works w' multiple lines) Only works with one line... >Thanks Jos, guinness Everything you need to try it is in the zip file. Constructive Critics and Suggestions are welcome ;-) Some Pics: Here you see a search for Text in File "@ScriptDir". All the files that have this in them will be listed Then search through the Preview for each instance of "@ScriptDir" until you find the one you want. expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=SnippetBrowserIcon.ico #AutoIt3Wrapper_UseUpx=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- SnippetBrowser1.0.2 AutoIt Version: 3.3.10.0 Author: Bill Script Function: Snippet Browser with Search and Syntax Hi-Liting #ce ---------------------------------------------------------------------------- #Region ;==================#includes #include <Array.au3> #include <File.au3> #include <ButtonConstants.au3> #include <GuiButton.au3> #include <EditConstants.au3> #include <GuiEdit.au3> #include <GuiRichEdit.au3> #include <GUIConstantsEx.au3> #include <Constants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ListviewConstants.au3> #include <GuiListView.au3> #include <GUIToolTip.au3> #include "_FindInFile.au3" #include "RESH.au3" #EndRegion ;==================#includes Global $sBlistView, $sString, $aColorTable Global $sLastSearch = "" Global $iSearchStart = 0 Global $sFolder = @ScriptDir ; works as browser in any folder you put the script in #Region ;==================GUI $Form1 = GUICreate("SnippetBrowser", 810, 680, 246, 140) $hToolTip = _GUIToolTip_Create(0) $Input1 = GUICtrlCreateInput("Search_Files", 10, 16, 160, 21) $sBlistView = GUICtrlCreateListView("Path", 10, 45, 790, 253, BitOR($LVS_SINGLESEL, $LVS_SHOWSELALWAYS)) _GUICtrlListView_SetColumnWidth($sBlistView, 0, 770) $search = GUICtrlCreateButton("File Search", 190, 14, 81, 25) $searchTip = GUICtrlGetHandle($search) _GUIToolTip_AddTool($hToolTip, 0, "Search Through Working Dir for Text in File", $searchTip) $ClearAll = GUICtrlCreateButton("Clear", 290, 14, 81, 25) $ClearAllTip = GUICtrlGetHandle($ClearAll) _GUIToolTip_AddTool($hToolTip, 0, "Clear List View of Last Search", $ClearAllTip) $getFiles = GUICtrlCreateButton("Get Files", 390, 14, 81, 25) $getFilesTip = GUICtrlGetHandle($getFiles) _GUIToolTip_AddTool($hToolTip, 0, "Populate List View with AutoIT Files from Working Dir", $getFilesTip) GUICtrlSetState($getFiles, $GUI_DEFBUTTON) $Input2 = GUICtrlCreateInput("Search_Text", 10, 306, 160, 21) $showSelected = GUICtrlCreateButton("Preview", 390, 305, 81, 25) $showSelectedTip = GUICtrlGetHandle($showSelected) _GUIToolTip_AddTool($hToolTip, 0, "Shows Preview of Selected Path", $showSelectedTip) $textSearch = GUICtrlCreateButton("Text Search", 190, 305, 81, 25) $textSearchTip = GUICtrlGetHandle($textSearch) _GUIToolTip_AddTool($hToolTip, 0, "Search Through Preview for Text", $textSearchTip) $label1 = GUICtrlCreateLabel($sFolder, 485, 20, 315, 25) GUICtrlSetTip(-1, "Working Directory: " & $sFolder, "", 0, 2) GUICtrlSetData($label1, $sFolder) $openSelected = GUICtrlCreateButton("Open in SciTE", 290, 305, 81, 25) $openSelectedTip = GUICtrlGetHandle($openSelected) _GUIToolTip_AddTool($hToolTip, 0, "Open Selected Path in SciTE", $openSelectedTip) $throwString = GUICtrlCreateButton("Throw String", 490, 305, 81, 25) $throwStringTip = GUICtrlGetHandle($throwString) _GUIToolTip_AddTool($hToolTip, 0, "Sends Selected String to wherever your cursor was blinking in SciTE", $throwStringTip) $iCheckbox = GUICtrlCreateCheckbox("Tool Tips Off", 600, 305, 185, 25) $hEdit = _GUICtrlRichEdit_Create($Form1, "", 10, 336, 790, 310, BitOR($ES_MULTILINE, $WS_VSCROLL, $WS_HSCROLL, $ES_AUTOVSCROLL)) _GUICtrlRichEdit_SetBkColor($hEdit, 0xEFEFEF) GUISetState(@SW_SHOW, $Form1) #EndRegion ;==================GUI #Region ; ==================while loop While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $iCheckbox If _IsChecked($iCheckbox) Then _GUIToolTip_Deactivate($hToolTip) Else _GUIToolTip_Activate($hToolTip) EndIf Case $getFiles ;~ Populates ListView with Files from Working Directory~ _getFiles() Case $throwString ;~ Takes Selected text and sends it to open SciTE Window where Cursor was~ $editSelTest = _GUICtrlRichEdit_IsTextSelected($hEdit) If $editSelTest = True Then $sString = _GUICtrlRichEdit_GetSelText($hEdit) & @CRLF _SciTE_InsertText($sString) Else MsgBox(0, "error!", "Nothing Selected") EndIf Case $openSelected ;~ Opens Selected Path in SciTE Editor (New Tab)~ _openSelected() Case $showSelected ;~ Previews Selected Path in Preview Window with Syntax Hiliting (RESH.au3)~Thanks Beege! ~ _showSelected() Case $ClearAll ;~ Empties ListView of foundPaths to Make Room for New Search~ _GUICtrlListView_DeleteAllItems($sBlistView) Case $search ;~ Searches Working Directory for "Text in File" Thanks guinness !~ _search() Case $textSearch ;~ Searches Preview for Text ~ Keep Clicking to Find Next ~ Thanks Melba23 ~ $sSearchTerm = GUICtrlRead($Input2) If $sSearchTerm Then ; If new search then reset start If $sSearchTerm <> $sLastSearch Then $iSearchStart = 0 $sLastSearch = $sSearchTerm EndIf _GUICtrlRichEdit_SetSel($hEdit, $iSearchStart, $iSearchStart) $iIndex = _GUICtrlRichEdit_FindText($hEdit, $sSearchTerm) _GUICtrlRichEdit_SetSel($hEdit, $iIndex, $iIndex + StringLen($sSearchTerm)) $iSearchStart = $iIndex + StringLen($sSearchTerm) EndIf EndSwitch WEnd #EndRegion ; ==================while loop #Region ; ==================functions Func _getFiles() ;~ Populates ListView with Files from Working Directory~ Local $FileList_A = _FileListToArrayRec(@ScriptDir, "*au3", 1, 1, 0, 2) For $i = 1 To $FileList_A[0] _GUICtrlListView_AddItem($sBlistView, $FileList_A[$i] & @LF) ConsoleWrite("$FileList_A[$i]: " & $FileList_A[$i] & @CR) Next EndFunc ;==>_getFiles Func _showSelected() ;~ Previews Selected Path in Preview Window with Syntax Hiliting (RESH.au3)~Thanks Beege! ~ Local Enum $iMacros, $iStrings, $iSpecial, $iComments, $iVariables, $iOperators, $iNumbers, $iKeywords, _ $iUDFs, $iSendKeys, $iFunctions, $iPreProc, $iComObjects Local $aColorTable[13] ;notice values can be either 0x or # $aColorTable[$iMacros] = '#808000' $aColorTable[$iStrings] = 0xFF0000 $aColorTable[$iSpecial] = '#DC143C' $aColorTable[$iComments] = '#008000' $aColorTable[$iVariables] = '#5A5A5A' $aColorTable[$iOperators] = '#FF8000' $aColorTable[$iNumbers] = 0x0000FF $aColorTable[$iKeywords] = '#0000FF' $aColorTable[$iUDFs] = '#0080FF' $aColorTable[$iSendKeys] = '#808080' $aColorTable[$iFunctions] = '#000090' $aColorTable[$iPreProc] = '#808000' $aColorTable[$iComObjects] = 0x993399 Local $iSelect = _GUICtrlListView_GetSelectedIndices($sBlistView, True) If $iSelect[0] > 0 Then Local $sSelect = StringTrimRight(_GUICtrlListView_GetItemText($sBlistView, $iSelect[1]), 1) _GUICtrlRichEdit_SetText($hEdit, FileRead($sSelect)) _RESH_SetColorTable($aColorTable) _RESH_SyntaxHighlight($hEdit) Else MsgBox(0, "", "Nothing Selected") EndIf EndFunc ;==>_showSelected Func _openSelected() ;~ Opens Selected Path in SciTE Editor (New Tab)~ Local $iSelect = _GUICtrlListView_GetSelectedIndices($sBlistView, True) If $iSelect[0] > 0 Then Local $sSelect = StringTrimRight(_GUICtrlListView_GetItemText($sBlistView, $iSelect[1]), 1) Return _SciTE_Send_Command(0, WinGetHandle("DirectorExtension"), 'open:' & StringReplace($sSelect, '\', '\\')) Else MsgBox(0, "", "Nothing Selected") EndIf EndFunc ;==>_openSelected Func _search() ;~ Searches Working Directory for "Text in File" Thanks guinness !~ Local $aArray = _FindInFile(GUICtrlRead($Input1), $sFolder, '*.au3') $rows = UBound($aArray) For $i = 0 To $rows - 1 GUICtrlCreateListViewItem($aArray[$i] & @LF, $sBlistView) Next EndFunc ;==>_search Func _SciTE_InsertText($sString) $sString = StringReplace($sString, '\', '\\') _SciTE_ReplaceMarcos($sString) Return _SciTE_Send_Command(0, WinGetHandle('DirectorExtension'), 'insert:' & $sString) EndFunc ;==>_SciTE_InsertText Func _SciTE_ReplaceMarcos(ByRef $sString) $sString = StringReplace($sString, @TAB, '\t') $sString = StringReplace($sString, @CR, '\r') $sString = StringReplace($sString, @LF, '\n') EndFunc ;==>_SciTE_ReplaceMarcos Func _SciTE_Send_Command($hHandle, $hSciTE, $sString) Local $ilParam, $tData If StringStripWS($sString, 8) = "" Then Return SetError(2, 0, 0) ; String is blank. EndIf $sString = ":" & Dec(StringTrimLeft($hHandle, 2)) & ":" & $sString ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sString = ' & $sString & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console $tData = DllStructCreate("char[" & StringLen($sString) + 1 & "]") ; wchar DllStructSetData($tData, 1, $sString) $ilParam = DllStructCreate("ptr;dword;ptr") ; ulong_ptr;dword;ptr DllStructSetData($ilParam, 1, 1) ; $ilParam, 1, 1 DllStructSetData($ilParam, 2, DllStructGetSize($tData)) DllStructSetData($ilParam, 3, DllStructGetPtr($tData)) _SendMessage($hSciTE, $WM_COPYDATA, $hHandle, DllStructGetPtr($ilParam)) Return Number(Not @error) EndFunc ;==>_SciTE_Send_Command Func _IsChecked($iControlID) Return BitAND(GUICtrlRead($iControlID), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>_IsChecked #EndRegion ; ==================functions SnippetBrowser1.0.zipSnippetBrowser_1.0.1.zip ~ update: 14 Dec 2013SnippetBrowser_1.0.1.zip ~ update: 18 Dec 2013 SnippetBrowser_1.0.2.zip ~ update: 26 Dec 2013 Bill Edited December 26, 2013 by l3ill SorryButImaNewbie, mLipok and Skampp 3 My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
guinness Posted December 12, 2013 Share Posted December 12, 2013 Func _SciTE_Send_Command($hWnd, $hSciTE, $sString) If StringStripWS($sString, $STR_STRIPALL) = '' Then Return SetError(2, 0, 0) ; String is blank. EndIf $sString = ':' & Dec(StringTrimLeft($hWnd, 2)) & ':' & $sString Local $tData = DllStructCreate('char[' & StringLen($sString) + 1 & ']') ; wchar DllStructSetData($tData, 1, $sString) Local Const $tagCOPYDATASTRUCT = 'ptr;dword;ptr' ; ';ulong_ptr;dword;ptr' Local $tCOPYDATASTRUCT = DllStructCreate($tagCOPYDATASTRUCT) DllStructSetData($tCOPYDATASTRUCT, 1, 1) DllStructSetData($tCOPYDATASTRUCT, 2, DllStructGetSize($tData)) DllStructSetData($tCOPYDATASTRUCT, 3, DllStructGetPtr($tData)) _SendMessage($hSciTE, $WM_COPYDATA, $hWnd, DllStructGetPtr($tCOPYDATASTRUCT)) Return Number(Not @error) EndFunc ;==>_SciTE_Send_Command Func _SciTE_InsertText($sString) ; $sString = _GUICtrlRichEdit_GetSelText($hEdit) << Do this on line 77, not in this wrapper function. Return _SciTE_Send_Command(0, WinGetHandle("DirectorExtension"), "insert:" & $sString) EndFunc ;==>_SciTE_InsertText Nice idea. Here are a couple of updates to some of those function(s)... Also you're passing $sString to _SciTE_InsertText() on line 77, but you're not actually declaring it. Try not to use Global variables if you can, which from what I can see you don't need to use any in this script. Plus, my username is missing another n. --_0 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...
l3ill Posted December 13, 2013 Author Share Posted December 13, 2013 Thanks guinness, sorry about msp your un, I am pretty sure that was a Tidy error And thanks for the updates / suggestions will fix ASAP. While Ive got yer attention, I was curious as to how would you go about fixing the Throw String Func to: Add a carriage return after pasting ( as to prepare for next paste w/out need to change windows ) Ability to select and throw more than one line @ a time. That whole function was a CCP and the part of my script that I dont fully comprehend. cya, Bill My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
guinness Posted December 13, 2013 Share Posted December 13, 2013 (edited) All of these functions can be found in SciTE Jump under SciTE.au3. Open in SciTE, don't use ShellExecute, instead use.. Func _SciTE_Open($sFilePath) Return _SciTE_Send_Command(0, WinGetHandle("DirectorExtension"), 'open:' & StringReplace($sFilePath, '\', '\\')) EndFunc ;==>_SciTE_Open Ideally WinGetHandle("DirectorExtension") should be a Global variable or something. You can see how I do it in SciTE.au3. Why not just append @CRLF to $sString = _GUICtrlRichEdit_GetSelText($hEdit) & @CRLF and then pass $sString to _SciTE_InsertText()? Then with your final problem, can you do multi selection in an edit control? Find out the answer by searching around a little. I didn't give you that insert text did I? As it's wrong >> Func _SciTE_InsertText($sString) $sString = StringReplace($sString, '\', '\\') _SciTE_ReplaceMarcos($sString) Return _SciTE_Send_Command(0, WinGetHandle('DirectorExtension'), 'insert:' & $sString) EndFunc ;==>_SciTE_InsertText Func _SciTE_ReplaceMarcos(ByRef $sString) $sString = StringReplace($sString, @TAB, '\t') $sString = StringReplace($sString, @CR, '\r') $sString = StringReplace($sString, @LF, '\n') EndFunc ;==>_SciTE_ReplaceMarcos Edited December 13, 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...
guinness Posted December 13, 2013 Share Posted December 13, 2013 Feature Request: Use modern colour scheme instead of the old one. 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...
l3ill Posted December 13, 2013 Author Share Posted December 13, 2013 (edited) Why not just append @CRLF to $sString = _GUICtrlRichEdit_GetSelText($hEdit) & @CRLF and then pass $sString to _SciTE_InsertText Sad. I actually thought about trying that and then didnt because I couldnt allow myself to believe it could be that simple. ()? Then with your final problem, can you do multi selection in an edit control? Find out the answer by searching around a little. Yes. Multiselection is possible but now it only throws the first line. I will study up on this... these 2 things were on the ToDo list for an update down the road along with an ADDSNIPPET func. Feature Request: Use modern colour scheme instead of the old one. Would gladly Oblige...but I have no idea what you mean... Edit: are you referring to the syntax hilites? Thanks for your time! Bill Edited December 13, 2013 by billo My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
guinness Posted December 13, 2013 Share Posted December 13, 2013 (edited) Yeah, I meant for the highlighting in RESH. Also see my edit above with a fix to the insert text function. I am working on a snippet holder for SciTE Jump over Christmas by the way. Edit: Then I again I might not, but all the functions are there, it's just a matter of putting the pieces together. Edited December 13, 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...
l3ill Posted December 13, 2013 Author Share Posted December 13, 2013 Yep,, plenty of updates.. cant wait to get back to my lair. Feel free to borrow any of my code for your snippet holder LOL God knows I borrow plenty of yours. My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
l3ill Posted December 13, 2013 Author Share Posted December 13, 2013 I didn't give you that insert text did I? As it's wrong >> Indirectly ...Got it from >here My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
guinness Posted December 13, 2013 Share Posted December 13, 2013 OK, but you can see it wasn't escaping TAB, CR, LF and . My updated version stripped from SciTE Jump can do this. 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...
Celtic88 Posted December 14, 2013 Share Posted December 14, 2013 --------------------------- AutoIt Error --------------------------- Line 468 (File "C:UsersDOCDesktopSnippetBrowser1.0RESH.au3"): Local $aRet = DllCallAddress('uint', DllStructGetPtr($tMem), 'struct*', $tRevIndex, 'struct*', $tSource, 'struct*', $tOutput, 'uint', (@AutoItX64 ? $iLen : $iLen / 4)) Local $aRet = DllCallAddress('uint', DllStructGetPtr($tMem), 'struct*', $tRevIndex, 'struct*', $tSource, 'struct*', $tOutput, 'uint', (@AutoItX64 ^ ERROR Error: Unable to parse line. --------------------------- OK --------------------------- Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 14, 2013 Moderators Share Posted December 14, 2013 DjForfun,You need the Beta version to run that new ternary syntax. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
l3ill Posted December 14, 2013 Author Share Posted December 14, 2013 (edited) To do list: Feature Request: Use modern colour scheme instead of the old one. Done Updated Functions Insert and Open ( updates from guinness ~ Thanks !) Done Add Carriage Return Function to Throw String Could not get it to work with the suggested solution And finally decided against it because most of the time I am nesting a one-liner in between two other lines Multi-Line Throw String coming soon...maybe P.S. also updated all MSP guinness' ...( I think...) Edited December 14, 2013 by billo My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
guinness Posted December 14, 2013 Share Posted December 14, 2013 P.S. also updated all MSP guinness' ...( I think...) Still mistakes there with my name. Plus it's Beege not Beeje. I also tried my suggestion of $sString = _GUICtrlRichEdit_GetSelText($hEdit) & @CRLF and it worked for me. Unless I misunderstood your point billo. 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...
l3ill Posted December 14, 2013 Author Share Posted December 14, 2013 Still mistakes there with my name. Plus it's Beege not Beeje. I also tried my suggestion of $sString = _GUICtrlRichEdit_GetSelText($hEdit) & @CRLF and it worked for me. Unless I misunderstood your point billo. Okay, I think thats all of them... Yes your right. it does work. I had added it quickly to test it before uploading not planning on it being part of this update. Turns out I added it to the wrong line Got lost in my own code No of course that has never happened to anyone but me, I know My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
l3ill Posted December 18, 2013 Author Share Posted December 18, 2013 1.0.1 Added - Carriage Return after "Throw String" Throw String now works with multiple lines selected. My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
l3ill Posted December 22, 2013 Author Share Posted December 22, 2013 (edited) Directions to add a shortcut to your Scite Tools Menu: Click on "Options" and choose Open au3.properties Scroll down to about line #265 and find the highest numbered Tool, in this case "# 34 Generate UDF header" Insert the following: (important !! change the path to match your own) # 40 SnippetBrowser command.40.$(au3)="I:\G_bkp_05.03.11\Desktop\Autoit Snippets\SnippetBrowser.exe" command.name.40.$(au3)=SnippetBrowser command.shortcut.40.*.au3=Ctrl+Alt+S command.subsystem.40.$(au3)=2 command.save.before.40.$(au3)=2 command.quiet.40.$(au3)=1 Should look like this: Save and restart SciTE SnippetBrowser is now startable from the Tool Menu or by Keyboard Shortcut Ctrl+Alt+S Edited December 26, 2013 by l3ill My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
l3ill Posted December 26, 2013 Author Share Posted December 26, 2013 Somewhat Larger update: Added Updated RESH file fixed a small bug with the IniRead Highlighting ~ once again... Thanks Beege! Added New _FileListToArrayRec to replace the one that needed the extra UDF - Still M23's work Added Turn Off Tool Tips ChecBox - they get pesky after a while... Updated the pics with Animated GIFS to see better how it works. My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
cueclub Posted March 9, 2015 Share Posted March 9, 2015 I had followed the instructions setforth in this post. however it will not let me save the au3.properties.. Any suggestions? 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