Here is the AutoIt script for anyone adventurous enough to edit and compile for themselves:
$m_amip = "C:\nextsong.txt" $m_ip = "127.0.0.1" $m_port = 9090 $m_class = "[CLASS:{97E27FAA-C0B3-4b8e-A693-ED7881E99FC1}]" TCPStartUp() $m_tcp = TCPConnect($m_ip,$m_port) If @error Then MsgBox(48, "FooSQ", "SqueezeCenter not responding.") Exit EndIf $m_foo = "foobar2000" $m_lts = 17 $m_f = "" $m_r = "0" $m_s = "0" $m_p = "?" $m_t = "" $m_l = "0" $m_n = "" $m_ne = "" $m_fn = "" $m_ln = "0" $m_lt=229 $m_title = WinGetTitle($m_class, "") HotKeySet("{NUMPADADD}" ,"Volume") HotKeySet("{NUMPADSUB}" ,"Volume") HotKeySet("{NUMPADMULT}" ,"Volume") TCPSend($m_tcp,"playlist clear" & @CRLF) While 1 $m_title = WinGetTitle($m_class, "") If NOT StringInStr( $m_title, $m_foo ) Then Exit EndIf $m_ln = StringLen($m_title) if $m_ln <> $m_lts Then $m_title = WinGetTitle($m_class, "") $a_tn = StringSplit($m_title, "/") $m_fn = $a_tn[1] $m_r = $a_tn[2] $m_p = $a_tn[3] EndIf Select Case $m_ln = $m_lts AND $m_s <> "0" $m_s = "0" TCPSend($m_tcp,"stop" & @CRLF & "playlist clear" & @CRLF) Case $m_ln <> $m_lts AND $m_s = "0" $m_s = "1" $m_f = $m_fn $m_sq = StringReplace(StringReplace($m_fn, "\", "/"), " ", "%20") TCPSend($m_tcp, "playlist play " & $m_sq & @CRLF) Case $m_ln <> $m_lts AND $m_s = "1" if $m_p = "1" Then $m_s = "2" TCPSend($m_tcp,"pause 1" & @CRLF) Else if $m_f <> $m_fn Then $m_sq = StringReplace(StringReplace($m_fn, "\", "/"), " ", "%20") if $m_t = "0" Then if $m_fn <> $m_n Then TCPSend($m_tcp,"playlist play " & $m_sq & @CRLF) Endif Else TCPSend($m_tcp,"playlist play " & $m_sq & @CRLF) Endif $m_t = "" $m_ne = "" Else if $m_r = "11" OR $m_r = "10" Then if $m_ne = "" Then $m_amips = FileOpen($m_amip, 0) $m_n = FileReadLine($m_amip) FileClose($m_amip) $m_sq = StringReplace(StringReplace($m_n, "\", "/"), " ", "%20") TCPSend($m_tcp,"playlist insert " & $m_sq & @CRLF) $m_ne = "1" Endif Endif if $m_r = "0" OR $m_r = "1" Then $m_t = "0" Endif Endif $m_f = $m_fn EndIf Case $m_ln <> $m_lts AND $m_s = "2" if $m_p = "?" Then $m_s = "1" TCPSend($m_tcp, "pause 0" & @CRLF) EndIf EndSelect sleep($m_lt) WEnd Func Volume() If StringInStr(@HotKeyPressed,"{NUMPADADD}") Then TCPSend($m_tcp,"mixer volume +5" & @CRLF) ElseIf StringInStr(@HotKeyPressed,"{NUMPADSUB}") Then TCPSend($m_tcp,"mixer volume -5" & @CRLF) ElseIf StringInStr(@HotKeyPressed,"{NUMPADMULT}") Then TCPSend($m_tcp,"mixer volume 0" & @CRLF) EndIf EndFunc Exit -- stuffedspacedog ------------------------------------------------------------------------ stuffedspacedog's Profile: http://forums.slimdevices.com/member.php?userid=38655 View this thread: http://forums.slimdevices.com/showthread.php?t=79575 _______________________________________________ discuss mailing list discuss@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/discuss