Skip to content

Commit

Permalink
fix profile bug
Browse files Browse the repository at this point in the history
  • Loading branch information
I5UCC committed Jun 14, 2023
1 parent 68d0955 commit 0eb2b38
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions Mousemeeter.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ global DeactivateOnWindow := False
global default_file := "default.xml"
global profile1_file := "profile1.xml"
global profile2_file := "profile2.xml"
global current_file := default_file

Menu, Tray, DeleteAll
Menu, Tray, NoStandard
Expand Down Expand Up @@ -146,10 +147,13 @@ return
^+R::
KeyWait, R
KeyWait, R, d t0.250
If (Errorlevel)
If (Errorlevel) {
voicemeeter.restart()
Else
}
Else {
voicemeeter.load(default_file)
current_file := default_file
}
Return

;Mouse-HOTKEYS
Expand Down Expand Up @@ -239,10 +243,26 @@ F24::
Else {
KeyWait, %A_ThisHotkey%
KeyWait, %A_ThisHotkey%, d t0.250
If (Errorlevel)
voicemeeter.load(profile1_file)
Else
voicemeeter.load(profile2_file)
If (Errorlevel) {
if (current_file == profile1_file) {
voicemeeter.load(default_file)
current_file := default_file
}
Else {
voicemeeter.load(profile1_file)
current_file := profile1_file
}
}
Else {
if (current_file == profile2_file) {
voicemeeter.load(default_file)
current_file := default_file
}
Else {
voicemeeter.load(profile2_file)
current_file := profile2_file
}
}
}
Return

Expand Down

0 comments on commit 0eb2b38

Please sign in to comment.