Jump to content

AU3 Syntax Highlight for RichEdit - Machine Code Version - Updated 12/25/2013


Beege
 Share

Recommended Posts

cool will do. Thanks guinness

No problem. It's quite minor in retrospect.

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 parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

  • 9 months later...

Line 671 when calling _ArraySwap it now has an invalid number args.

_ArraySwap($aUniq[Random(1, $aUniq[0], 1)], $aUniq[Random(1, $aUniq[0], 1)])

Should be:

 _ArraySwap($aUniq, $aUniq[Random(1, $aUniq[0], 1)], $aUniq[Random(1, $aUniq[0], 1)])

:)

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

  • 3 weeks later...

Found couple things in __RESH_ReplaceCommentBlocks

Func __RESH_ReplaceCommentBlocks(ByRef $sCode, $sUpdateFunction = 0)
    Local $time = TimerInit()

    If Not StringRegExp($sCode, '(?i)#ce|#cs|#comments-end|#comments-start') Then Return ;ConsoleWrite('!no comment blocks' & @LF)

    ;Go through code and replace comment block groups with a unique string
    Local $iIdx = 1
    Local $aCode = StringSplit($sCode, @CR, 2)
    $sCode = ''
    Local $sCB = '', $iLine = 0
    While $iLine < UBound($aCode) - 1
        If StringRegExp($aCode[$iLine], "(?i)\A[^;'""]*(#cs|#comments-start)") Then
            ;build comment block
            $sCB = ''
            Do
                $sCB &= $aCode[$iLine] & @CR
                $iLine += 1
            Until StringRegExp($aCode[$iLine], "(?i)\A[^'"";]*(#ce|#comments-end)")
            $sCB &= $aCode[$iLine]

            ;verify unique string is not in script
            While StringInStr($sCode, $g_aUniqStrings[$iIdx])
                $iIdx += 1
            WEnd

            ;add unique string to collection.
            $g_oUnique_Comments.Add($g_aUniqStrings[$iIdx], $sCB)
            $sCode &= $g_aUniqStrings[$iIdx] & @CR
            $iIdx += 1
        Else
            $sCode &= $aCode[$iLine] & @CR
        EndIf
        $iLine += 1
    WEnd
    If $iLine <= UBound($aCode)  Then $sCode &= $aCode[$iLine] & @CR

    If $g_RESH_VIEW_TIMES Then ConsoleWrite('ReplaceCommentBlocks = ' & TimerDiff($time) & @LF)
EndFunc   ;==>__RESH_ReplaceCommentBlocks

Here is the updated function.. :

Func __RESH_ReplaceCommentBlocks(ByRef $sCode, $sUpdateFunction = 0)
    Local $time = TimerInit()

    If Not StringRegExp($sCode, '(?i)#ce|#cs|#comments-end|#comments-start') Then Return ;ConsoleWrite('!no comment blocks' & @LF)

    ;Go through code and replace comment block groups with a unique string
    Local $iIdx = 1
    Local $aCode = StringSplit($sCode, @CR, 2)
    $sCode = ''
    Local $sCB = '', $iLine = 0
    While $iLine < UBound($aCode) - 1
        If StringRegExp($aCode[$iLine], "(?i)\A[^;'""]*(#cs|#comments-start)") Then
            ;build comment block
            $sCB = ''
            Do
                $sCB &= $aCode[$iLine] & @CR
                $iLine += 1
                If $iLine = UBound($aCode) - 1 Then ExitLoop ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Here
            Until StringRegExp($aCode[$iLine], "(?i)\A[^'"";]*(#ce|#comments-end)")
            $sCB &= $aCode[$iLine]

            ;verify unique string is not in script
            While StringInStr($sCode, $g_aUniqStrings[$iIdx])
                $iIdx += 1
            WEnd

            ;add unique string to collection.
            $g_oUnique_Comments.Add($g_aUniqStrings[$iIdx], $sCB)
            $sCode &= $g_aUniqStrings[$iIdx] & @CR
            $iIdx += 1
        Else
            $sCode &= $aCode[$iLine] & @CR
        EndIf
        $iLine += 1
    WEnd
    If $iLine <= UBound($aCode) - 1 Then $sCode &= $aCode[$iLine] & @CR ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Here 

    If $g_RESH_VIEW_TIMES Then ConsoleWrite('ReplaceCommentBlocks = ' & TimerDiff($time) & @LF)
EndFunc   ;==>__RESH_ReplaceCommentBlocks

EDIT: I'm thinking of taking the development of this. Here is the updated RESH UDF : RESH.au3

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

  • 11 months later...

Hello everyone.

Could you explain how can I add some words to highlight, if it possible? I need to read very large logs and want to highlight some commands in it - and the main problem is speed of applying colors to those words. My program is very slow.

This UDF works very fast and it is amazing. But, as I understand, info which words should be highlighted place inside crypt string.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...