I don't understand what to write in my script.
For practical purposes, the basic format for AutoHotKey scripts is:
So if you wanted to make the
a key actually trigger the
z key, you would write:
You can (potentially) put as many of these combinations as you like into a script but each one has to appear on a new line.
If you wish to make scripts which are more complicated, you should check out the official AutoHotKey hotkey documentation.
I would like to set the keys
f10 so that they [trigger media keys]:
f9- previous song and
f10 - next song.
Each media key has its own special representation in AutoHotKey. Consulting the official AutoHotKey keylist and its section on media keys, we can see the ones you are interested in are represented as
Media_Next. Likewise, we can see that the F keys are simply written as normal (e.g.
Taking what we know so far, we can now write the following script:
Note that you will typically want to save your scripts with an
.ahk extension (e.g. as
media_keys.ahk, for instance.)
I don't even know where to save the script.
You can save it wherever you like. For the most part, its location shouldn't matter.
That said, keep in mind that you do need to have the script running to have your F keys work as media keys. If you want to have the script start with Windows, you may want to put a shortcut to it in your Startup folder.
Why do I have to use the Fn key for some options to work?
An Fn key is a modifier key that activates the secondary function of a "dual-purpose" key on a keyboard.
These "dual-purpose" keys are often found on smaller laptops, where the F keys (or others) may, in addition to their normal uses, have special functions (e.g. such as controlling audio volume). This is often done to save space on the keyboard layout.
If you have to press an Fn key to get some of the script options above to work, this likely means that the laptop manufacturer has assigned the "normal" operation of the F keys as a secondary function (and the unmodified F key does something else).