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

Basics of Creating a Hotkey: Extract from Intro to AutoHotkey in v2

How to create a Hotkey: Intro to AHK in v2 Extract
Intro to AHK v2 Hotkeys Extract

This video teaches viewers how to create hotkeys in AutoHotkey v2 for launching actions and performing various tasks.

  • 00:00 📝 Learn how to create hotkeys in AutoHotkey, which are triggers used to launch actions, in this extract from the Intro to AHK v2 Hotkeys course.
  • 00:49 📝 Creating hotkeys in AHK v2 is as easy as creating hot strings, with the only difference being the syntax for specifying the hotkey and the action, and modifier keys like Control, Alt, Shift, and Windows can be referred to using special characters.
  • 02:09 💡 To create a hotkey in AHK v2, use the character for the modifier key (e.g., control) followed by the desired key (e.g., enter) and separate them with a colon.
  • 03:03 📝 The speaker explains the difference between hotkeys and hot strings, and demonstrates how to create a hotkey that opens a website when a specific key combination is pressed.
  • 04:08 💡 The Run command in AHK v2 allows the user to execute files or open websites with their default application, making it convenient and efficient.
  • 05:12 🔑 You can easily create hotkeys for various actions like opening files, folders, or websites using AHK v2, with the hotkey command taking a hotkey as the first parameter and the corresponding action on the right side.
  • 05:58 💡 The speaker explains how to define and use a function in AHK v2 for performing actions based on a specific hotkey.
  • 06:50 💡 Create dynamic hotkeys in AutoHotkey by defining a variable and using an if statement to determine if the hotkey should be set or not.
hey it’s Joe Glines from the-Automator and this video we’re going to show you it’s an extract from our Intro to Autohotkey course intro and V2 that is and this is going to walk you through how to create HotStrings and Hotkeys right phenomenally helpful you can use them to launch things you can do using them for a lot of different stuff they’re think of them as triggers when you want to do
something is the most often used so in this video here is this is going to walk you through how to set them up I’m going to put up a coupon code or a link that’ll give you 20 percent off if you’re interested in getting the intro to AutoHotkey course it’s a great solid course I think it’s around four hours long most of videos are between three to five minutes this one’s a little bit longer butthey’re very very to the point and easy to follow they’re built for people who don’t know anything about
coding so check it out I hope you liked it please like the video If this helps you because it really helps us out cheers creating HotStrings so again anAuto Hotkey it is just a matter of specifying the Hotkey that you want and the action the only thing that changes a little bit is the syntax of how you do that let me go ahead and show you how to create static and dynamicHotkeys so if we open a new file we have our directives here for single instance and what it requires and in this case let’s
go ahead and create a Hotkey you have the hashtag like this so if I want to create a Hotkey that says Ctrl enter
or Ctrl shift enter I don’t have to write control or you know shift I don’t have to write any of that I just use the character that is designed for it and that’s the reason why on the Hotkeys because you because each each of them has a specific meaning but now to create a Hotkey let’s go ahead and say that I want to show a message box when I hit control enter so what I would do is I would have
to use the character for control which is the correct and then enter as a word like that and then I put two columns one after the Auto which defines that I’m doing a HotString instead of aHotkey here I don’t have the two columns at the beginning but I do have the two columns to divide the action in this case let’s go ahead
and do message box right and this is a test so now when I run this script whenever I hit Ctrl enter on my keyboard I will get this new box this is great as I mentioned it’s really easy and even though this example is very simple you could do many Auto things and actually very cool things for example just to show you how easy it is instead of a message box let’s do something a little bit more practical let’s say that I want to have a website show up whenever I press aHotkey so let’s go ahead and do control okay shift
F1 I can do this Ctrl shift F1 now what I could use in this case is the-Automator
website here I run this up and again as I mentioned this is Ctrl shift plus F1 in this case and this is Control Plus enter right so I’m running my script Ctrl shift F1 just goes ahead and open scrum with that page so just imagine how cool it is that you can create HotStrings and is
the same concept with the Hotkey command instead so this command takes a Hotkey as the first parameter notice that I’m actually putting quotation marks because this is literal text so this would be control so let’s say Ctrl shift enter in this case and then the action goes on the right side but the second side the the action that I’m going to perform is usually a function that you’re going to call and for that reason I do not have to put that in quotation marks because it is a function object and not only that I have
to Define define the function myself so let’s say open desktop this is going to be my function I just name it like that but as that is not literal text this is referring to a function you do not have to put quotation marks there but you do have to define the function somewhere else we will talk about functions later during the course but as a quick overview this function will take one parameter it is the plot key that I press this up and in the braces here I’m going to put the actions that I want to perform with this function in this case
what I want to do is run the desktop so a desktop is a variable that contains the path to my desktop and if I try to run a folder what is going to happen is that AutoHotkey is just going to go ahead and open the folder in Explorer so in this case this is the way to define a dynamic Hotkey which you can of cAutose use option right if you have a variable called option you can determine if it is true or false and if it is true then go ahead and use theHotkey and set theHotkey if it is false don’t set it so this is the way
to create Dynamic Hotkeys the-Automator this is how simple you can create Hotkeys in here

Comments are closed.