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

Create a Menu to easily select and send snippets of text

Create a menu to easily send snippets of text.  Watch the video here

Easily select from a list and send a snippet of text with AutoHotkey

Easily select from a list and send a snippet of text with AutoHotkey


The key idea of the video is that AutoHotkey allows users to easily select and send snippets of text, including the ability to alphabetize them and remove white spaces.

  • 00:00 This script allows users to easily select and send snippets of text by creating a list of hot strings.
  • 00:39 The speaker demonstrates how to select and send snippets of text using AutoHotkey, including alphabetizing the list and removing white spaces.
  • 01:23 The function allows you to select an item from a menu, copy it to the clipboard, and paste it, with a sleep step to avoid pasting the restored clipboard.
  • 02:09 Easily select from a list and send a snippet of text with AutoHotkey by using line breaks and removing spaces.
  • 03:24 Easily select and send snippets of text with AutoHotkey, including the ability to alphabetize them automatically.
  • 03:57 Using the tick mark r instead of the tick mark for line breaks allows for alphabetical sorting, but still includes the line breaks.
  • 05:03 The speaker discusses a fix for a delay issue with the clipboard in AutoHotkey.
  • 06:38 Easily select from a list and send a snippet of text with AutoHotkey, a quick and efficient way to have frequently used text at your fingertips.

 

hey it’s Joe Glines from the-Automator and today’s little script i have for you it’s one i think i shared from a webinar before but um i don’t think i actually have a single instance of it so let me show you here what it does someone reached out to me they were you know wanting to be able to to have a lot of basically hot strings the problem of course with hot strings is that you can’t remember them all if you have a lot of them and so this little script here this is the everything is in here right it’s it’s
fully contained to add so i’m using this crazy pipe just because you this would never come up or probably never come up and something you’re using so we’re just parsing on it each each line is going to be something that you might want to type right so we’re storing that in the variable text if you want this alphabetized you can have this line here if you don’t just comment it out so i’m going to uncomment to start so they won’t be they’ll show up in this order and then ctrl shift l is for me
just like list is what i was thinking right here’s my list of stuff is going to trigger this text menu function and we pass it the text variable so from here it jumps into here and it’s text options that’s what gets used here’s the parameter and we parse it the using store split we’re parsing on that crazy pipe and it’s going to iterate over it and dump it into my menu right where we’re actually and then i i added this trim just to to get rid of if there’s white spaces on the ends just
because you probably don’t want those right so just in case they’re up there right you could turn that off if you didn’t want that function and then the action is going to be how it actually you know jumps to it and this is going to show it and then after it shows it will delete it all once you’ve selected something so when you have the action and jumps in here to this label and first backs up your clipboard and then it gets this is what i love this a this menu item so it’s going to pull whichever one you selected
shove it into the clipboard sorry right here shove it in the clipboard send a control v for paste now this is a very important step add a sleep of like 50 uh to 100 somewhere in there you want to sleep because if you if you restore your clipboard too soon it ends up pasting your restore this because it says paste but then restores a clipboard before it pastes so it’s really crazy so let me demonstrate here let me bring oversight and let me launch this so control and let me zoom in here so ctrl shift l so here are the options notice they’re
not alphabetized because here’s this where have you been up for a chat so that didn’t work let’s try it again there we go maybe let’s go back into here and maybe i’m going to make this 100 i think that 50 was a bit too slow so i i relaunched it control shift down did you miss me i missed you so there we go and that’s that’s basically it now let’s say we wanted to actually you know what this let’s say we wanted a new line where have you been and then a new line here this of course you just put in the tick
mark n so the thing to the left of the one the tick mark n save reload ctrl shift l now it doesn’t display here right where have you been up for a chat so it doesn’t show you that line break there however when you paste it notice it does have the line break there of course we probably would want to get rid of the spaces so we’d probably want it like this save reload ctrl shift let’s control shift l where have you been and notice it puts it in there so that’s a simple way now let’s let’s add back in
the alphabetize because if you have a lot of these to me i don’t want to have to manually alphabetize them but when you’re going to look for the stuff when you have a lot of them control travel you can just think of the first word right oh i love the kaya launched it launch it ctrl shift l and now the alphabetization is not why is ap what why is oh that’s hilarious okay um unfortunately the sorting okay if you if you do have a line break you can’t sort okay quick intermission i happen to be editing this video and had a thought
what if we use the tick mark r for the line break instead of the tick mark n the tick mark r is the carriage returning tick mark in as a new line character and when we use the tick mark r even with the sort uh it does so ctrl shift l uh you don’t see it here where was it are you up so now it is alphabetically sorted but it still puts in the line break so i was incorrect in here where i said you can’t use it i’m just fyi so ignore that part the original schedule um and honestly that that would be much more complex to figure out how to
fix that we’d have to encapsulate each one probably shoved into an object to have them completely by themselves and then do it um at least off the top of my head so so i would leave off the alphabetization if you have this tick mark in if we get rid of this and re-enable this so we launch and then come back control shut down so notice they’re alphabetized um so that’s just a little bummer it’s not a simple fix for that at least not one that pops now that’s interesting that again didn’t uh let’s go back and take a
look here what else could it be it dude no oh you know what let’s let’s do this um so clipboard oh i need to move this up above and then add a clip weight to play comma we’ll give it this is in seconds so we’re going to say one and now let’s relaunch it see if this still works ctrl shift down ready so that worked but there was quite a delay there let me try this again no no it’s waiting unfortunately it’s waiting that to get shoved in there so i think what we need to do is the this clipboard weight actually
we do it which we blink the clipboard try to push something into it and then we wait for it i was doing the weight before we shut so i was waiting a second um and then it did it after so it basically added like a sleep kind of and so what i should have been doing was saying hey let’s blank the clipboard let’s put it here and then it’s going to wait for it to have something and so that’s the important part is clear the clipboard out put this in there and now this should at least the bare minimum
control shift down it should this part should be quick now what will be interesting is if that got rid of the times where it was missing and so far it’s been a good so that’s interesting seems to be good now and while we work through that i hadn’t actually used it that much again i use qap quick access pop-up for this kind of stuff i like being able to build it but qap has so many other things it makes it much more complex and of course if you want to add a new one you could just come in here and say
i would just copy this so copy paste save reload control shift down let’s get rolling this ctrl shift l that is all you have to do there it is and there it is so i think it’s pretty slick nice easy way to be able to have those at your fingertips of course you can change that hotkey here i’m using ctrl shift l right study up and out of hockey look at the different keys you could have for that hope it helps cheers oh and hey if this helps you please like the video it really helps me out and you know add some comments or see if
you have any ideas of how you’re going to use it cheers

Comments are closed.