• Become a Power user Intro to AutoHotkey Intermediate AutoHotkey Intermediate Objects GUIs are Easy w/AutoHotkey Painlessly switch from V1 to V2

SciTE Output Function

SciTE editorHere’s the SciTE Output Function I wrote in AutoHotkey.  Connecting to this output window is simple and saves a ton of time!

How to Send Text to the SciTE Output Pane | Easily display a ton of text
How to Send Text to the SciTE Output Pane | Easily display a ton of text

The key idea of the video is to demonstrate a function for sending and manipulating text in the SciTE output pane using AutoHotkey.

  • 00:00 📝 Joe Glines demonstrates a function for sending text to the SciTE output pane, which allows for displaying large amounts of text that can be scrolled, highlighted, and copied.
  • 00:50 💡 Prepend a line break before the output and choose whether to clear the output pane and ask about exiting.
  • 01:13 💡 The code can be modified to display a large amount of text in the SciTE output pane without clearing the previous output.
  • 02:02 💡 The speaker discusses how to control line breaks and formatting in the SciTE output pane when sending text.
  • 02:55 👉 The script prompts the user to confirm whether they want to continue running it, with the default option being “no”.
  • 03:30 💡 The application sends a message to clear the output window if the clear value is set to 1, and it prepends a line return and a new line in front of the text if the line break is equal to 1.
  • 04:06 💡 If the variable “exit” is equal to 1, a message box will ask if the user wants to exit the application, and if they say yes, the application will exit.
  • 04:31 📝 Save the file “site_output” in your autohotkey lib folder with the same name as the function, allowing you to easily grab and manipulate text from the SciTE output pane without creating a GUI or using an include.

SciTE4AutoHotkey Debug Window Transcription

closed rogue lines and this is a quick review of the function I wrote for sending text to this output window here in sight and so first off when when you’re in sight let’s say everything I launched the script and it’s gonna loop over the same 40 times having the index and a tab and so that’s that’s basically here but then when you run it so now when I run it here in the message box it shows it here right but what if this was 4,000 right putting something like at this size gets to be pretty unwieldy in
a message box then I can’t scroll down you know look at the bottom I can’t do much of it I also can’t highlight it meaning I can’t copy and paste from it but what is cool with site is I lift this function and here’s my little cheat sheet to it right so here’s the the text of the variable that we’re going to put into it whether you want to clear the output pane first or not if you’d like to – prepend a line break before at the output you put in there and also if you want to have it ask you if you want to
exit without continuing on on this one these are the defaults so normally I have it clear the output insert the line break and not ask about exiting so technically we can do something like this coming here right so now when I run this and it dumps it all and that was what that was the 4,000 right dumps it all down to this output window and notice how it prepended a blink to it and it’s also it’s using the default so it pre pens it it clears the output inserts line break does not ask me about exiting let’s say I decide I want to I
don’t want to clear the output so if I change that to a zero and I relaunch it now you’ll notice it go it didn’t wipe out the output right the old output was still there however I can just go back and change this to a one reload it launched it now there’s just the 4,000 right so that’s taking care of that do I want to have a line break before it and let’s get back to let’s say 40 ok save that with the 40 and even then you can see here and you know a better case is where I’m not clearing the output so
let me get rid of that guy and here you’ll notice notice how this one the 40 here it would have if I did not have this line break so let’s make that back to a zero it would have put it see how here it puts all right next to it right more often than not I want it to be starting on its own line and yeah you could control that within your program but hey you know what I just put the defaults to have it that way and again let’s say we had 4,000 this part if you want to make this a 1 what we’ll do is
when it runs it it says hey you know you just did something this is just a way for me to check to say do you really want to keep running the script next to the application you can hit yes or no actually you know I should probably change the default to be no buthere I can just say yes and you don’t see it but now I can’t actually get any hot cues because the script stopped it exited and so let’s take a look at the function real quick it’s pretty short here’s the function right here’s where I
define the default values and in it I first say okay give me the application give me an object to the open site application and then I have some just basically one-line logic where hey if the clear value is 1 right so if this value set to 1 then it’s going to send this message to wipe the output window then it goes the next one if the if the line break is equal to 1 then hey lets prepend line return a new line in front of text right and it’s just going to set it here so now that text variable is going to have basically this prepended
to it and so that’ll be saved there then regardless of that it sends the output that the variable to the output window the output pane and next here says hey if exit is equal to 1 then let’s ask with a message box do you want to exit the application and depending if you say yes it’ll just exit the app and that’s it that’s it’s a very short function but comes in real handy when you’re you’re dealing with a lot of output you want to be able to grab stuff from it because it’s very nice to be
able to to grab the stuff here and copy and paste it or manipulate itbesides you don’t have to create a GUI to see you know just dumping it into a message box so if you save this file the site underscore output into your lib folder so here wherever you have AutoHotkey typically that that’s where I put them is under the AutoHotkey where it’s installed the lib folder they’re in here you’ll see I have a site folder or file sorry and you name it the file name needs to be the same as the function for
it to work this way then you can use this function anywhere you want you don’t have to use an include if you do it that way which is also very nice so that’s it I hope hope it helps it’s a lot of it’s very convenient to be able to just dump stuff to this output window because otherwise is not used for much Thanks

Comments are closed.