Now works with OBS, even if not focused
This commit is contained in:
parent
cc9e99497f
commit
c284af0ddf
119
MidiRules.ahk
119
MidiRules.ahk
|
@ -101,6 +101,125 @@ ProcessCC(device, channel, cc, value) {
|
|||
}
|
||||
DisplayOutput("Games Unmuted", "")
|
||||
}
|
||||
|
||||
; Get the PID of OBS directly
|
||||
Process, Exist, obs64.exe
|
||||
obsPID := ErrorLevel
|
||||
|
||||
;*************************************************
|
||||
;* Start / Stop Streaming Button (Play Icon) *
|
||||
;*************************************************
|
||||
|
||||
if (cc = 115 && value = 127) {
|
||||
DisplayOutput("Streaming Started / Stopped", "")
|
||||
PostMessage, 0x100, 0x7D, 0, , ahk_pid %obsPID% ; WM_KEYDOWN F14
|
||||
Sleep, 10
|
||||
PostMessage, 0x101, 0x7D, 0, , ahk_pid %obsPID% ; WM_KEYUP F14
|
||||
}
|
||||
|
||||
;**************************************************************
|
||||
;* Stop Streaming - Discarding Delay (Stop Solo Mute Button) *
|
||||
;**************************************************************
|
||||
|
||||
if (cc = 105 && value = 127) {
|
||||
DisplayOutput("Streaming Started / Stopped", "")
|
||||
PostMessage, 0x100, 0x7E, 0, , ahk_pid %obsPID% ; WM_KEYDOWN F15
|
||||
Sleep, 10
|
||||
PostMessage, 0x101, 0x7E, 0, , ahk_pid %obsPID% ; WM_KEYUP F15
|
||||
}
|
||||
|
||||
;*************************************************
|
||||
;* Start / Stop Recording Button (Record Icon) *
|
||||
;*************************************************
|
||||
|
||||
if (cc = 117 && value = 127) {
|
||||
DisplayOutput("Streaming Started / Stopped", "")
|
||||
PostMessage, 0x100, 0x7C, 0, , ahk_pid %obsPID% ; WM_KEYDOWN F13
|
||||
Sleep, 10
|
||||
PostMessage, 0x101, 0x7C, 0, , ahk_pid %obsPID% ; WM_KEYUP F13
|
||||
}
|
||||
|
||||
;*************************************************
|
||||
;* Change Scene All Screens *
|
||||
;*************************************************
|
||||
|
||||
if (cc = 8 && value = 0) {
|
||||
DisplayOutput("Changing Scene", "All Screens (With Brainrot)")
|
||||
; Press Shift key using Send
|
||||
Send, {Shift Down}
|
||||
; Press F13 key using PostMessage
|
||||
PostMessage, 0x100, 0x7C, 0, , ahk_pid %obsPID% ; WM_KEYDOWN F13
|
||||
Sleep, 10
|
||||
PostMessage, 0x101, 0x7C, 0, , ahk_pid %obsPID% ; WM_KEYUP F13
|
||||
; Release Shift key using Send
|
||||
Send, {Shift Up}
|
||||
}
|
||||
|
||||
;*************************************************
|
||||
;* Change Scene Main Screen Only *
|
||||
;*************************************************
|
||||
|
||||
if (cc = 9 && value = 0) {
|
||||
DisplayOutput("Changing Scene", "All Screens (No Brainrot)")
|
||||
; Press Shift key using Send
|
||||
Send, {Shift Down}
|
||||
; Press F14 key using PostMessage
|
||||
PostMessage, 0x100, 0x7D, 0, , ahk_pid %obsPID% ; WM_KEYDOWN F14
|
||||
Sleep, 10
|
||||
PostMessage, 0x101, 0x7D, 0, , ahk_pid %obsPID% ; WM_KEYUP F14
|
||||
; Release Shift key using Send
|
||||
Send, {Shift Up}
|
||||
}
|
||||
|
||||
;*************************************************
|
||||
;* Change Scene Top Left Only *
|
||||
;*************************************************
|
||||
|
||||
if (cc = 10 && value = 0) {
|
||||
DisplayOutput("Changing Scene", "Be Right Back")
|
||||
; Press Shift key using Send
|
||||
Send, {Shift Down}
|
||||
; Press F15 key using PostMessage
|
||||
PostMessage, 0x100, 0x7E, 0, , ahk_pid %obsPID% ; WM_KEYDOWN F15
|
||||
Sleep, 10
|
||||
PostMessage, 0x101, 0x7E, 0, , ahk_pid %obsPID% ; WM_KEYUP F15
|
||||
; Release Shift key using Send
|
||||
Send, {Shift Up}
|
||||
}
|
||||
|
||||
;*************************************************
|
||||
;* Change Scene Bottom Left Only *
|
||||
;*************************************************
|
||||
|
||||
if (cc = 11 && value = 0) {
|
||||
DisplayOutput("Changing Scene", "Be Right Back")
|
||||
; Press Shift key using Send
|
||||
Send, {Shift Down}
|
||||
; Press F16 key using PostMessage
|
||||
PostMessage, 0x100, 0x7F, 0, , ahk_pid %obsPID% ; WM_KEYDOWN F16
|
||||
Sleep, 10
|
||||
PostMessage, 0x101, 0x7F, 0, , ahk_pid %obsPID% ; WM_KEYUP F16
|
||||
; Release Shift key using Send
|
||||
Send, {Shift Up}
|
||||
}
|
||||
|
||||
;*************************************************
|
||||
;* Change Scene Be Right Back *
|
||||
;*************************************************
|
||||
|
||||
if (cc = 15 && value = 0) {
|
||||
DisplayOutput("Changing Scene", "Be Right Back")
|
||||
; Press Shift key using Send
|
||||
Send, {Shift Down}
|
||||
; Press F20 key using PostMessage
|
||||
PostMessage, 0x100, 0x84, 0, , ahk_pid %obsPID% ; WM_KEYDOWN F20
|
||||
Sleep, 10
|
||||
PostMessage, 0x101, 0x84, 0, , ahk_pid %obsPID% ; WM_KEYUP F20
|
||||
; Release Shift key using Send
|
||||
Send, {Shift Up}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
ProcessPC(device, channel, note, velocity) {
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user