Personal auto hotkey script showcase 2


about | home | creative/projects | blog | misc | guestbk/socials |




intro


This is the second entry in a multi part series where I dive into the auto hot key script that I use on all of my computers to enhance its core functionality! I believe that since computers are involved in so many parts of our lives, it is very important to become as proficient at using them as possible. so lets begin!




Switch ahk scripts


  
^!z::
Run C:\interuserstorage\ahkstuff\st1.ahk
ExitApp
  

This one of my favorite commands, with this I am able to start a different ahkscript and exit the currently running ahk script. This is useful for switching what your base commands do and effectively opens up an unlimited number of actions that can be performed with ahk! For instance, you could create an ahk profile for different apps, which talor your ahk functionality to the app in question.


extended logi options plus functionality


  

;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ SCROLL BUTTON


#SingleInstance Force


;@@@@@@@@@@@@DOWNSTROKE
; windows cut functionality
^+F1::  ; Ctrl + Shift + F1
    Sleep, 100
    Send, ^x                              ; Sends Ctrl + X
return

;@@@@@@@@@@@@RIGHT
; PRESS ENTER!
^+F2::  ; Ctrl + Shift + F2
    Sleep, 100
    SendInput, {Enter}
return

;@@@@@@@@@@@@LEFT
; ALT tab 
^+F3::  ; Ctrl + Shift + F3
    Sleep, 100
    Send, {Alt down}{Tab}{Alt up}       ; Alt + Tab
    Sleep, 200
return

;@@@@@@@@@@@@UP
; new window!
^+F4::  ; Ctrl + Shift + F4
    Sleep, 100
    Send, ^n                               ; Ctrl + N
return

;@@@@@@@@@@@@PRESS
; screen snip : )
^+F5::  ; Ctrl + Shift + F5
    Sleep, 100
    Send, #+s  


  

Another favorite of mine, I use this to synergize ahk with the mouse configuration software logi options plus. In logi options plus you are given a set number of macros each button can perform. However, all of these basic actions can be emulated via ahk. By setting the buttons to call the commands defined in ahk, this allows profiles as talked about in the previous snippet to be extended to any logi mouse. Currently, I have a button on my mouse which switches ahk profiles, so that instead of being limited to the limited number of actions allowed by logi options plus, I can vastly increase the number of actions allowed by the mouse software. Whats more, since all of my computers use the same ahk script, if I remote into a different computer, all commands that I input from the host computer will transfer over to the remote computer. This effectly prevents any sort of issues with commands not being executed on other computers and ensures the same functionality from device to device.




Ensuring your ahk script starts on pc start up


Now with everything I have talked about so far, all of the gains in efficiency are undercut by the fact that you need to run the ahk script every time you start your computer. I am going to show you how to configure the scheduler in order to make the ahk run automatically.


scheduler intro


The first thing you want to do is to open up the search bar and type in task scheduler. It should open up an image that looks like the image above.

Then go here, and hit create basic task. Afterwards, go through the setup and configure it like how I have my task configured below. Of course you will need to change the path to be relevant to how you have your AHK scripts set up. I like to have my scripts in a path located directly in C:\ since that allows access to my AHK scripts if I am logged into a different user account.