Scripting tutorial for Tags and Captions
I often mention that I use a AutoHotkey scripts for adding the tags and captions to all my uploads, and in this post I will explain how I actually do it.
First of all, this tutorial only works with a windows PC. I don’t know of any equivalent programs like this for Mac, Linux or mobile.
Step one is downloading the “current version” of the program: AutoHotkey and install it. Now you can get started with scripting.
You can write scripts in any text editior, I personally would recommend Notepad++ but window’s regular notepad will do the job just fine.
To write your first script, simply right click on your desktop and select “New > AutoHotkey script, then right click on the new file and select “edit script”.
Alternatively you can just create a “.txt” file and change the file extension to “.ahk”.
A newly created AHK script will already have a few lines of text in it, for a script as simple as the one we’re writing you can ignore that text.
Please note: anytime you make a change to your script you have to save and reload it for the changes to take effect.
A much more detailed Explanation for how to get started can be found here
This is what a normal hotkey command looks like:
F6::
Sendinput, hello
Return
In this case, the F6 key is the hotkey, designated as such by the “::” behind it.
In the next line we have the actual command that get’s triggered by the hotkey, in this case it is “Sendinput,” which will send whatever text you put behind it, in this case “hello”, you can also send other key presses by putting them into these: {} brackets, for example adding {space} which will have the same effect as you pressing the space bar.
Please note: anything you want to send with the sendinput command needs to be in the same line as the command itself.
“Return” tells the script that whatever action your hotkey is supposed to perform ends here which allows you to add the next hotkey or whatever in your script.
I would also recommend to add a modifier key such as control or alt to your hotkeys so you can still use the keys original function.
To use alt as a modifier key simply add a exclamation point to your hotkey like this: !F6::
Now this hotkey will only trigger if you press alt and F6 at the same time.
A much more detailed Explanation for hotkeys and modifier keys can be found here
Hotstrings
Hotstrings basically work the same as Hotkeys with the main difference that you use a word or phrase to trigger the a command instead of a key. This is what it looks like:
::wha::
Sendinput, Witch Hat Atelier
Return
Your trigger phrase or word get’s designated by putting “::” in front of it and behind it. The command will trigger as soon as you hit the space bar or the enter key once you’ve written the word or phrase, however it will not trigger if you just keep writing, so for example if you write “what” instead of “wha” the command will not trigger.
There are many, MANY commands other than “Sendinput” you can trigger, but for now, this is all we need for what we’re trying to do.
A much more detailed Explanation for hotstrings can be found here
Tagging and caption script for tumblr
This is a simplified version of what my command for captioning and tagging Berserk posts looks like,
Berserkk with double k is the trigger word so this command doesn’t trigger every time you write the word Berserk:
::berserkk::
sendinput, Source: Berserk / ベルセルク {enter}by Kentaro Miura{tab}Berserk{enter}Kentaro Miura{enter}Manga and Stuff{enter}Mangacap{enter}Manga{enter}Art{enter}
Please note: everything after “sendinput” needs to be in the same line, tumblr’s formatting just added line breaks.
And this is what the result of this command looks like:
And here with a visual explanation what all these {words} did
And that’s basically it...
AutoHotkey is an immensely powerful program and it can do much more elaborate stuff than tagging your tumblr posts, but you’ll have to learn that yourself.
Some resources:
-AutoHotkey documentation
-AutoHotkey help forum
-AutoHotkey subreddit
I really hope this tutorial is somewhat clear and understandable, I’ve tried to keep it as short and on point as possible.