Simple Script to Help Your Work
Using Autohotkey, we can simplify the way we work on Windows. Here I show a simple example. We will made simpler way to access Microsoft Word, Excel, and PowePoint
First, open notepad or any text editor you prefer to use. Then write this scripts
#NoTrayIcon
#SingleInstance ignore
#Persistent
;code start here
^!w::
run winwordreturn
^!x::
run excelreturn
^!p::
run powerpntreturn
^!c::
ExitApp
;conde end here
Code explanations:
#NoTrayIcon: Disables the showing of a tray icon. Note that if you want to gain control of the script, don’t include this line.
#SingleInstance ignore: Make only one instance of application run. If you open new instance, it will be terminated automatically.
#Presistent: Keeps a script permanently running until the user closes it.
Line started with “;” are comment.
^![hotkey]: Means if we pressed Ctrl (representated with “^”)+Alt (“!”)+hotkeys (w,x,p), script will open application you’ve choose after the RUN command. In this case, winword are name of MS. Word executable file. Otherwise, Pressing Ctrl+Alt+C will terminate script (ExitApp command).
The return command means it will return from a subroutine and prevent multi command execution.
If you want to append another application to the hotkeys. Just specify the file location after RUN command. Exception, if your application located under Program files directory, use built in variable %A_ProgramFiles%. Example %A_ProgramFiles%\mIRC\mIRC.exe.
There’s many way we can simplify our work. Make your own way using Autohotkey.