While 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
SciTE Output Pane AutoHotkey Function
SciObj := ComObjActive("SciTE4AHK.Application") ;get pointer to active SciTE window
IfEqual,Clear,1,SendMessage,SciObj.Message(0x111,420) ;If clear=1 Clear output window
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
Configuring SciTE to automatically trim whitespace upon file save is super-easy! A minor tweak to the user.properties will tell SciTE to, automatically, trim spaces, tabs, etc. from the end of each line.
The following example is what I added to have it apply to my AutoHotkey files (which have an extension of .ahk). If you have file patterns you can achieve the same goal by using something like this: strip.trailing.spaces.$(file.patterns.yaml)=0
Configure SciTE to automatically trim whitespace upon file save
SciTE Editor demonstration
If you frequently use tools like Notepad, Notepad++, Textpad, etc. I highly recommend you give the SciTE editor a try! Here is a great video demonstrating it’s powerful features and how it can save you a ton of time! It is highly customizable (but there is a learning curve to making the tweaks to your user settings. I love it because I have the property files (which provide IntelliSense & syntax highlighting for ~80 languages)
The editor is free and can be downloaded from here. If you’re using AutoHotKey you can get SciTE4AutoHotkey built by fincs here.