Then for this we will again make a hotkey that we can use to paste our string back, how about using shift+1 for this? +1:: this is a hotkey = shift+1Īfter that the frist thing we check is the content of our variable “clip_one”, for this we will use an IF condition statment that will tell us if something is true or false. Does that make sense to you? Ready to write a rutine to paste back the copied string we just got stored in our variable? Okay I hope that was not way over your head! If so, I’d like to know in the comments please, and i’ll do my best to help you with your copy and paste needs. Most! if not all, things must have an end, so to end this hotkey rutine we will use the “return” command return clip_one := ClipboardĪfter that we then restore the old content back on the clipboard from the variable that we store at the start of this hotkey rutine Clipboard := old_clip Okay now the clipboard holds the string that’s selected in the active window so lets store that copy in a new variable, we can call it “clip_one”. ClipWait, 2 wait for the empty clipboard to hold data So with this line we can wait for the keys we send, to copy the active selection in to the clipboard. So now we will wait for the clipboard to hold data, this will be easy, if the clipboard is empty, and remember we did empty the clipboard above. ^ is short for using to the active window. Here the first two lines are just info to the user so we use the as it makes the lines comments, and the script will not use them. In AutoHotkey the is the character for comments by defult so everything after the does nothing. Lets get to the lines of code as this is a tutorial on how to make a script that can hold multiple copied strings and paste them back. Right-click the file and choose Edit Script.Įach script is a plain text file containing commands to be executed by AutoHotkey.exe.Type a name for the file, ensuring that it ends in.(Alternatively, select New -> Text Document.) In the menu that appears, select New -> AutoHotkey Script.Right-click an empty spot on your desktop or in a folder of your choice.Now if you have AutoHotkey installed you can skip step one in this list. A text editor like Notepad or something like SciTE4AutoHotkeyĪnd 16 lines of plain text from this how-to.Before we start, all you need are 2 things:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |