MASTERING ADVANCED SHORTCUTS WITH AHK AUTOHOTKEY (ALTIUM EXAMPLES)

If you are like me, someone who would like to speed up your workflow with shortcuts then AHK is your best friend. AutoHotkey lets you make custom Windows shortcuts, macros, and more!

How to install the auto hotkey

Option 1 : Visit AutoHotkey’s homepage, click Download, and choose Download Current Version

Option 2: Search Autohotkey in Microsoft store, click Install,

How to Create New AutoHotkey Scripts

The program you just installed handles the execution of AHK scripts, but it won’t do anything until you actually have a script running.

To create a new AutoHotkey script, right-click anywhere on your desktop (or wherever else is convenient) and choose New > AutoHotkey Script. Name it something that makes sense. Then right-click on your new file and choose Edit Script, or open the file in your text editor of choice, to start working on it.

Check the active Note that you can also open your text editor, type up an AutoHotkey script, and save it as a file ending in .ahk to achieve the same result. Just make sure it has the right file extension!

Speaking of Notepad, it’s a good idea to upgrade your text editor from the basic Notepad to Notepad++ my preferred choice.

If you want the script to autostart with windows, copy and paste the .ahk files into your Startup folder. You can get there easily by typing shell:startup into the Start menu. Otherwise, browse to the following location:

C:\Users\[USER]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

check this link for some ideas -> www.maketecheasier.com/favorite-autohotkey-scripts/

How to find the active window

Normally the scripts run globally, but if you like to have customized shortcuts based on applications, then the below code can be used to

; Ctrl + A gives the name of the active window 
^a:: 
    WinGetActiveTitle, OutputVar
	MsgBox, %OutputVar%

Adding more shortcuts to Altium

What I have here is reconfiguring the numPad and the short cuts are in effect only

SetTitleMatchMode, 2
#IfWinActive Altium Designer (20.0.13) 	; activate only on altium
NumpadHome:: send cp                   	; package project -7
NumpadUp:: send !pn		        ; place net name - 8
NumpadPgUp:: send ^w                    ; Place wire -9
NumpadLeft:: send cc                    ; compile and validate project -4
NumpadClear:: send !dp			; synchronise ports -5
NumpadRight:: send !tau	                ; annotate schematics quitely -6

I am just tinkering at the edge of the iceberg here. A lot of things are possible with AHK. I will attach my altium.ahk for kick-starting your own setup.

MANU R Written by:

I am a seasoned Design Engineer with expertise in designing and developing high-performance audio systems for vehicles. With a diverse background spanning across multiple industries and geographies, I am passionate about creating cost-effective, quality solutions that push the boundaries of technology.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *