Created
January 27, 2025 11:06
-
-
Save danferns/069d1ef4d9fc164e55ed3788ffd7162c to your computer and use it in GitHub Desktop.
AutoHotKey V2 Script for FL Studio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SetDefaultMouseSpeed 0 | |
| ; move mouse in a multi-monitor setup with different DPI settings | |
| DPIAwareMouseMove(x, y) { | |
| DllCall("SetThreadDpiAwarenessContext", "ptr", -3, "ptr") | |
| MouseMove x, y | |
| } | |
| ; open a dropdown menu, remembering mouse pos | |
| ; y coord for the dropdown menu buttons | |
| DROPDOWN_Y := 23 | |
| ; x coords for different dropdown menus | |
| ADD := 104 | |
| TOOLS := 298 | |
| OpenDropdown(DROPDOWN) { | |
| MouseGetPos &mouseX, &mouseY | |
| Click Format("{1} {2}", DROPDOWN, DROPDOWN_Y) | |
| DPIAwareMouseMove(mouseX, mouseY) | |
| } | |
| ; --- Hotkeys Begin Here --- | |
| #HotIf WinActive("ahk_exe FL64.exe") | |
| ; move daw windows between left / right monitors | |
| LEFT_X := 1550 | |
| LEFT_Y := 60 | |
| RIGHT_X := 1920 + LEFT_X | |
| RIGHT_Y := LEFT_Y | |
| ^q::{ ; <- | |
| MouseGetPos &mouseX, &mouseY | |
| DPIAwareMouseMove(RIGHT_X, RIGHT_Y) | |
| SendMode "Event" | |
| MouseClickDrag "L", RIGHT_X, RIGHT_Y, LEFT_X, LEFT_Y, 2 | |
| DPIAwareMouseMove(mouseX, mouseY) | |
| } | |
| ^w::{ ; -> | |
| MouseGetPos &mouseX, &mouseY | |
| DPIAwareMouseMove(LEFT_X, LEFT_Y) | |
| SendMode "Event" | |
| MouseClickDrag "L", LEFT_X, LEFT_Y, RIGHT_X, RIGHT_Y, 2 | |
| DPIAwareMouseMove(mouseX, mouseY) | |
| } | |
| ; toggle browser | |
| !b::Send "!{F8}" | |
| ; link to controller | |
| ^+l::{ | |
| OpenDropdown(TOOLS) | |
| Send "{Up}{Up}{Right}l" | |
| } | |
| ; create automation clip | |
| ^+o::{ | |
| OpenDropdown(ADD) | |
| Send "a" | |
| } | |
| ; dump score log to piano roll | |
| ^Home::{ | |
| ; create a new pattern with the current timestamp | |
| day := FormatTime(,"d MMM") | |
| time := FormatTime(,"h:mm tt") | |
| Send "{F4}Score Log | " . day . " | " . time . "{Enter}" | |
| Sleep 50 | |
| ; open up option to select log duration | |
| OpenDropdown(TOOLS) | |
| Send "dd{Right}{Down}" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment