Shell run only runs .exe processes , ignores .cmd and .bat files. With this tiny .ahk script you can compile a exe that runs aliases from a .json file.
For example if you want to open a link to a documentation for a framework that you use, you can add it in commands.json and then open PowerToys Run and type s react
- If you dont want to install AHK, you can download the exe directly from HERE But the browser will show you a warning.
- Install AHK
- Find/make a folder that you will add in
System Environment VariablesunderPath, for exampleC:\ProgramData\alias\ - Make a copy of
JSON.ahk - Make a file with a short name like
s.ahkand paste the code below - Make a file called
commands.jsonpaste the code below and add your shortcuts/aliases there - Compile
s.ahk, AHK automatically addsCompilein Context Menu for.ahkfiles
Now you are set, test your aliases/shortcuts.
Your can edit your shortcuts by typing s edit and Notepad should open with your commands.json
You can send keys if you type Send keys, ex "t": "Send {Media_Play_Pause}" then s t to toggle music.
Here is a list of all the keys
{args} for all the text after alias
{argsURL} replaces space with +
{argsURI} Encodes text to URI