Jump to content

SciTE: jump to line ( in technicolor 😎 )


Recommended Posts

#include <WindowsConstants.au3>
Global $SciTE_hwnd = WinGetHandle("DirectorExtension")

Func SciTE_ConsoleWrite($sStr)
    Local Static $SciTE_My_Hwnd = 0
    _SendSciTE_Command($SciTE_My_Hwnd, $SciTE_hwnd, _
        "extender:dostring output:AppendText('" & _
        StringReplace(StringReplace(StringReplace(StringReplace($sStr, "\", "\\\\"), "'", "\\'"), @CR, "\\r"), @LF, "") & _
        "')")
EndFunc

Func _SendSciTE_Command($My_Hwnd, $SciTE_hwnd, $sCmd)
    Local $CmdStruct = DllStructCreate('Char[' & StringLen($sCmd) + 1 & ']')
    DllStructSetData($CmdStruct, 1, $sCmd)
    Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr')
    DllStructSetData($COPYDATA, 1, 1)
    DllStructSetData($COPYDATA, 2, StringLen($sCmd) + 1)
    DllStructSetData($COPYDATA, 3, DllStructGetPtr($CmdStruct))
    DllCall('User32.dll', 'None', 'SendMessageA', 'HWnd', $SciTE_hwnd, _
            'Int', $WM_COPYDATA, 'HWnd', $My_Hwnd, _
            'Ptr', DllStructGetPtr($COPYDATA))
    ;ConsoleWrite('-->' & $sCmd & @CRLF)
EndFunc   ;==>_SendSciTE_Command

SciTE_ConsoleWrite('c:\test\test     ''/test'' (console plane)  ('& @ScriptLineNumber &',0) will jump to line.' & @CRLF) ; "*" has no color
SciTE_ConsoleWrite('* "c:\test\test" ''/test'' (console plane)  ('& @ScriptLineNumber &',0) will jump to line.' & @CRLF) ; "*" has no color
SciTE_ConsoleWrite('> "c:\test\test" ''/test'' (console plane)  ('& @ScriptLineNumber &',0) will not jump to line.' & @CRLF) ; ">" has color
SciTE_ConsoleWrite('+ "c:\test\test" ''/test'' (console plane)  ('& @ScriptLineNumber &',0) will not jump to line.' & @CRLF) ; "+" has color

any way to jump to line and keep the color ?

Follow the link to my code contributionΒ ( and other things too ).
FAQ -Β Please Read Before Posting.
autoit_scripter_blue_userbar.png

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...