Progress - I have scripted autoit to change the device perfectly (2 scripts). I have foo_run installed but I don't know how to write the script in foo_run to execute the autoit scripts which once I figure that out, I can at least have 2 different function keys setup to do a quick switch.
So my 3 issues at this point are:
1 - Figure out how to make foo_run run my Autoit scripts (I can easily do this on a command line).
2 - Figure out how to execute a FB2K script at the start of play of each track
3 - Figure out how to test the number of channels in the track and then either execute the foo_run script or possible just execute my AutoIt scripts directly in this script thus eliminating the need for foo_run.
Any help would be greatly appreciated.
I use autohotkey with this script. I run it from buttons via foo_run/
The script is a quick and dirty mod of the original ahk script published on HA originally for 0.9
it works great !
It would be great that the output device was part of the API so that dev could do that simple thing. But it seems foobar devs have always done, and continue to do what they want, not what we need.
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.N.Other <myemail@nowhere.com>
;
;
; save script in foobar folder as "outputSelection.ahk" or compile it as "outputSelection.exe"
; run script with foo_run
; for exemple C:\Program Files\foobar2000\output.ahk 0
; what is ending "0" ?
; "0" is the first device output, if you want the 2nd
; C:\Program Files\foobar2000\outputselection.ahk 2
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SetTitleMatchMode, 2
IfWinExist, Preferences
Winclose
Run, foobar2000.exe /config
WinWait, Preferences, , 10
WinActivate, Preferences
ControlFocus, SysTreeView321,Preferences
WinGetText, win,Preferences
IfNotInString, win, Output
Loop
{send o
WinGetText, win,Preferences
IfInString, win, Output
break
}
ControlFocus, ComboBox1, Preferences
send, n
send, {home}
send, {Down %1%}
send, {return}
WinClose,Preferences
;Run, foobar2000.exe /stop
;Run, foobar2000.exe /play
return