-
Notifications
You must be signed in to change notification settings - Fork 2
My Scripts.ahk
My Scripts.ahk
is the main script of my entire repo, it's what helps facility most of the "experience" that helps make my collection of scripts seem less like singular macros and more like an entire package.
Alongside all the functions that run on startup, this script also contains a bunch of macros of it's own.
My Scripts.ahk
starts off by declaring MyRelease
, a global variable to dictate the release version you are running. We use this variable in some functions.
Then we define some settings.
-
#SingleInstance Force
to ensure only one instance of these scripts is open. -
SetWorkingDir(A_ScriptDir)
to set a consistent working directory. -
SetNumLockState("AlwaysOn")
to always have numlock enabled (a personal preference). -
SetCapsLockState("AlwaysOff")
to set CapsLock to be always disabled. This doesn't stop us from using it as a hotkey. -
SetScrollLockState("AlwaysOff")
to set ScrollLock to be always disabled. This doesn't stop us from using it as a hotkey. -
SetDefaultMouseSpeed(0)
to set the default mouse speed to be instant -
SetWinDelay(0)
to set the default window delay to be instant.
Then we set our tray icon, #Include
our functions & right click premiere.ahk
and we're done.
From there, this script will run through it's startup functions before finally hitting its hotkey definitions.
On this page, I will be referring to macros by their ;Hotkey;
tag and not their keybindings. This is to reduce the need for change in the event that a keybinding changes.
The below hotkeys will function even while the script is suspended.
runs: reload_reset_exit("reload")
runs: reload_reset_exit("reset")
runs: reload_reset_exit("exit")
runs: reload_reset_exit("exit", true)
runs: settingsGUI()
runs: activeScripts(MyRelease)
runs hotkeysGUI()
This hotkey will toggle suspend My Scripts.ahk
. Useful when booting up a game that hasn't been added to gameCheck yet.
everything below here will no longer work while script is suspended
This hotkey, on a douple tap of the CapsLock button will toggle the state of CapsLock. This hotkey is only necessary because I have capslock disabled by default.
This hotkey will centre the active window in the middle of the monitor it is active within. If pressed a second time on the same window, it will move it to the centre of the main monitor.
If the active window is a youtube window, it will be slightly larger to give the user more video viewing space.
This hotkey will check the state of the active window - if it is not currently fullscreen, it will maximise it, if it is, it will unmaximise it.
These hotkeys will run: jumpChar()
.
runs refreshWin()
passing the active window as the desired target. If the target window is Notepad.exe
or explorer.exe
it is able to determine the filepath of the current window and reopen it.
runs: switchTo.WindowSpy()
runs: switchTo.VSC()
runs: switchTo.Streamdeck()
Sends ^+{Esc}
to open the taskmanager.
runs: switchTo.Excel()
Attempts to open the local documentation, if the file can't be found it will fallback to the ahk documentation
Attempts to search the highlighted text in the local ahk documentation, before falling back to the online documentation in the event that the local file can't be found.
run: move.XorY()
The below hotkeys only activate while windows explorer is the active window.
Remaps !{Up}
to another button. (I have it set to WheelLeft
)
The below hotkeys only activate while VSCode is the active window.
run: VSCode.script()
run: VSCode.search()
I have a habit in VSCode of trying to use ^f
to search, while the explorer window is open instead of the code window. To combat this I made a hotkey that would highlight the code window first. In using that I realised that it would start the search field with the previous search. I didn't like this either and only wanted it to contain text if I had text highlighted.
For this hotkey to work editor.emptySelectionClipboard
must be set to false within VSCode. Because otherwise, sending ^c
to copy text while nothing is selected will copy the entire line which makes it impossible to check and see if the user has something highlighted.
run: VSCode.cut()
This hotkey is to return the usual experience of pressing ^x
in vscode (it will delete the entire line if nothing is selected). This experience only occurs while editor.emptySelectionClipboard
is enabled however, so as we have it disabled, we needed a workaround.
run: VSCode.copy()
This hotkey is to return the usual experience of pressing ^c
in vscode (it will copy the entire line if nothing is selected). This experience only occurs while editor.emptySelectionClipboard
is enabled however, so as we have it disabled, we needed a workaround.
The below hotkeys only activate while firefox is the active window.
This hotkey will search for and pause a youtube video if it exists.
These hotkey assignments disable the numpad while youtube is the active window to stop the user from accidentally bumping the numpad and teleporting somewhere in the video.
runs: move.Tab()
The below hotkeys only activate while discord is the active window.
These hotkeys will run their respective: discord.button()
function.
This hotkey will remap +*
to ^i
to italicise the highlighted text
runs: discord.Unread()
runs: discord.Unread(2)
This hotkey will click a the dm button on discord
The below hotkeys only activate while Adobe Photoshop is the active window.
These hotkeys run: ps.Type()
with the requested filetype as their parameters
runs: mousedrag()
with different tools
The below hotkeys only activate while Adobe After Effects is the active window.
runs: ae.timeline()
runs: mousedrag()
Send the hotkey for either the previousKeyframe
or nextKeyframe
which are both set within KSA
The below hotkeys only activate while Adobe Premiere Pro is the active window.
This hotkey disables Tab within Premiere. I find it mostly does nothing but make a mess of things so I opt to disable it completely. If the user still wishes to use tab (say to menu through properties of a track) double tapping Tab will result in the expected functionality.
This hotkey reactivates the clips currently on the timeline after unlinking/linking them as Premiere deselects them by default.
This hotkey returns the normal windows ability to press Ctrl & BackSpace
to delete an entire word at a time.
Sends the hotkey for zoomOut
which is set within KSA
While you're editing text, getting back to the selection tool by pressing (in my case) v
would just type v
in the text box. This hotkey will attempt to warp to and press the selection tool instead. If that fails, it will focus the tool hotbar and then input v
instead.
This function will focus the
Program Monitor
after it is complete
A hotkey to open my editing folder.
These hotkeys will move the playhead 12 frames in the desired direction.
run: prem.wheelEditPoint()
with their respective directions which is set within KSA.
Sends the hotkey playStop
(which is set within KSA) to stop playback on the timeline. I have this bound to a button on my mouse.
Send hotkeys relating to their respective direction to nudge tracks on the timeline. Hotkeys are set within KSA.
Send hotkeys relating to the respect speed change, to speed up or slow down playback on the timeline. Hotkeys are set within KSA.
runs: prem.mousedrag()
runs: prem.audioDrag()
with the respective audiofile name passed as the variable.
The below hotkeys only activate while a window in the group Editors
is NOT the active window.
runs: move.Window()
with the respective hotkeys passed in as the variable to manipulate windows with just my mouse.
Toggles AlwaysOnTop
for the active window.
Searches the highlighted text in google.
Will attempt to determine whether to completely capilitilse or lowercase the highlighted text depending on which is more frequent.
Will send A_YYYY "-" A_MM "-" A_DD
runs: fastWheel()
to speed up scrolling.
runs: youMouse()
with the respective hotkeys passed in as the variables to skip ahead/back in youtube.
Keeping Track
Keyboard Shortcut Adjustments
libs & Classes
Editors
Apps
Other lib files
Hotkeys
Timer Scripts
- adobe fullscreen check.ahk
- Alt_menu_acceleration_DISABLER.ahk
- autodismiss error.ahk
- autosave.ahk
- gameCheck.ahk
- Multi-Instance Close
Other Scripts
Other Guides