Great function for sending text to the SciTE Output Pane

SciTE Output paneWhile I predominately view text with Message boxes in AutoHotkey, sometimes they are not the right tool for the job.  I wrote a short function to automate sending text to the SciTE Output pane.

SciTE is a great editor however the Output pane is greatly underutilized.  Below is the function I wrote to manipulate it.  You can download the SciTE Output Function here or grab it below

SciTE Output Pane AutoHotkey Function


SciTE_Output(Text,Clear=1,LineBreak=1,Exit=0){
SciObj := ComObjActive("SciTE4AHK.Application") ;get pointer to active SciTE window
IfEqual,Clear,1,SendMessage,SciObj.Message(0x111,420) ;If clear=1 Clear output window
Sleep, 500
IfEqual, LineBreak,1,SetEnv,Text,`r`n%text% ;If LineBreak=1 prepend text with `r`n
SciObj.Output(Text) ;send text to SciTE output pane
;~ IfEqual, Exit,1,MsgBox, 36, Exit App?, Exit Application? ;If Exit=1 ask if want to exit application
;~ IfMsgBox,Yes, ExitApp ;If Msgbox=yes then Exit the appliciation
}

And here is a short video walking through how to use it

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.