Your script will be pre-populated with some basic settings. This allows you to have, for example, the same shortcut doing different things in two different programs. You can create global scripts in AutoHotkey that will work everywhere, in every app and the Windows desktop, but you can also target apps. Target specific apps or windowsīefore we start, let’s first check out the program we wish to make a script for. If you don’t have any such tool installed, and since your first scripts will be simple, you can even use Windows’s Notepad.įor those wondering, I personally use all those tools for other purposes (like HTML, CSS, and some very basic JS, PHP, and Python), but for editing AHK scripts, I find myself returning to the popular Notepad . Anything from Atom to Sublime Text or VS Code will do. You can edit AHK files in any text editor, but since scripting is a lite version of programming, it’s better if you use a program made for that purpose. Instead of double-clicking the AHK file you created like you’d do to run a pre-made script, right-click on it and select Edit. Actually, though, AHK files are scripts you can open in any text editor.Ĭreate a new folder for your first AutoHotkey script wherever you wish, enter it, right-click and create a “New -> AutoHotkey Script” from the new option in your right-click menu. That’s why they work as executables – AutoHotkey parses them in realtime and executes their contents. Make a blank scriptĪfter its installation, AutoHotkey will have registered as the default app for files with the AHK extension. ![]() Ignore the other two options – “V2” is a new version, incompatible with existing scripts and with a slightly different syntax, while “V1.0 Deprecated” is old and restricted. Installationĭownload and install AutoHotkey from its official site. With Studio open, launch Window Spy and click in the location where you'd like to place your mouse.For this tutorial, we start with the bare basics that will get you started in turning any multi-step process into a single keystroke. To find the right coordinates, use Window Spy, a utility that comes with AutoHotkey (you can launch it by typing Window Spy in the Windows search window or you can find it here: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\AutoHotkey). Note: Depending on your screen size and where you want to place your mouse pointer, you may need to modify the coordinates in the script. Doing so should move the mouse to the top of the screen. Save the file and double-click it to activate the script.Īnd that's it, now try it by going to Studio, placing your mouse anywhere and then hitting the Insert key. Insert
0 Comments
Leave a Reply. |