Posted by member 37809 on 2004-08-24 16:01:31 link
It was broken in geekamp, and then removed in dynamp :/
Time to coax some module coders to fix it...
Anyhoo, here's a bang from my theme if you want to adjust it (I didn't bother to really clean it up after adding in foobar2000 support later; also there are some sanity checks for when the winamp time escape codes of xLabel weren't available in seconds units):
Time to coax some module coders to fix it...
Anyhoo, here's a bang from my theme if you want to adjust it (I didn't bother to really clean it up after adding in foobar2000 support later; also there are some sanity checks for when the winamp time escape codes of xLabel weren't available in seconds units):
; seeks to a given time (give or take 3s i think)
; we have to do it the crazy way since !Amp_MovePosition is broken!
*script bang !maudioctrl_jumpto ;<seconds>
*script gotoif ("%{audiostatus}" = "Idle") donenow
; check current track to see if it has definite time
*script exec !LabelInfoExport b "[winampTotalTime('sec')]"
*script gotoif ("%{b}" = "0") done
*script gotoif ("%{b}" = "") done
*script exec !varset to %{\1}
; get current time
*script exec !LabelInfoExport a "[winampTime('sec')]"
*script exec !ifeval ("%{a}" = "") '|varset a 0'
*script exec !ifeval ("%{a}" = "-1") '|varset from 0' else '|varset from %{a}'
*script gotoif ("$audioplayer_foobar$" = "1") fb2k
; either rewind or fast forward
*script gotoif ("%{from}" < "%{to}") wfw
*script gotoif ("%{from}" > "%{to}") wrw
*script goto done
*script label wfw
*script exec !varset cmd ffwd
*script exec !varset amt %#%{to}-%{from}%#
*script goto wpre
*script label wrw
*script exec !varset cmd rewd
*script exec !varset amt %#%{from}-%{to}%#
*script label wpre
*script exec !varset m20 %#%{amt}/20%#
*script exec !varadd amt -%#20*%{m20}%#
*script exec !varset m10 %#%{amt}/10%#
*script exec !varadd amt -%#10*%{m10}%#
*script exec !varset m5 %#%{amt}/5%#
*script exec !varadd amt -%#5*%{m5}%#
*script label wl20
*script gotoif ("%{m20}" = "0") wdr
*script exec !amp_%{cmd}20s
*script exec !varadd m20 -1
*script goto wl20
*script label wdr
*script exec !ifeval ("%{m10}" = "1") '|amp_%{cmd}10s'
*script exec !ifeval ("%{m5}" = "1") '|amp_%{cmd}5s'
;*script exec !ifeval ("%{amt}" > "2") '|amp_%{cmd}5s'
*script label done
*script exec !LabelUpdate audioInfoTime
*script label donenow
*script exit
*script label fb2k
*script exec !ifeval ("%{audiostatus}" = "Playing") '|varset unpause true' else '|varset unpause false'
*script exec !ifeval ("%{unpause}" = "true") {"$FoobarPath$" /pause}
*script gotoif ("%{from}" < "%{to}") fw
*script gotoif ("%{from}" > "%{to}") rw
*script goto done
*script label fw
*script exec !varset cmd ahead
*script exec !varset amt %#%{to}-%{from}%#
*script goto pre
*script label rw
*script exec !varset cmd back
*script exec !varset amt %#%{from}-%{to}%#
*script label pre
*script exec !varset m600 %#%{amt}/600%#
*script exec !varadd amt -%#600*%{m600}%#
*script exec !varset m300 %#%{amt}/300%#
*script exec !varadd amt -%#300*%{m300}%#
*script exec !varset m120 %#%{amt}/120%#
*script exec !varadd amt -%#120*%{m120}%#
*script exec !varset m60 %#%{amt}/60%#
*script exec !varadd amt -%#60*%{m60}%#
*script exec !varset m30 %#%{amt}/30%#
*script exec !varadd amt -%#30*%{m30}%#
*script exec !varset m10 %#%{amt}/10%#
*script exec !varadd amt -%#10*%{m10}%#
*script exec !varset m5 %#%{amt}/5%#
*script exec !varadd amt -%#5*%{m5}%#
*script exec !varset m1 %{amt}
*script label l600
*script gotoif ("%{m600}" = "0") l300
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 10 minutes"
*script exec !varadd m600 -1
*script goto l600
*script label l300
*script gotoif ("%{m300}" = "0") l120
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 5 minutes"
*script label l120
*script gotoif ("%{m120}" = "0") l60
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 2 minutes"
*script exec !varadd m120 -1
*script goto l120
*script label l60
*script gotoif ("%{m60}" = "0") l30
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 1 minute"
*script label l30
*script gotoif ("%{m30}" = "0") l10
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 30 seconds"
*script label l10
*script gotoif ("%{m10}" = "0") l5
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 10 seconds"
*script exec !varadd m10 -1
*script goto l10
*script label l5
*script gotoif ("%{m5}" = "0") l1
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 5 seconds"
*script label l1
*script gotoif ("%{m1}" = "0") l0
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 1 second"
*script exec !varadd m1 -1
*script goto l1
*script label l0
*script exec !ifeval ("%{unpause}" = "true") {$maudioctrl_pause$}
*script goto done
*script ~bang
; we have to do it the crazy way since !Amp_MovePosition is broken!
*script bang !maudioctrl_jumpto ;<seconds>
*script gotoif ("%{audiostatus}" = "Idle") donenow
; check current track to see if it has definite time
*script exec !LabelInfoExport b "[winampTotalTime('sec')]"
*script gotoif ("%{b}" = "0") done
*script gotoif ("%{b}" = "") done
*script exec !varset to %{\1}
; get current time
*script exec !LabelInfoExport a "[winampTime('sec')]"
*script exec !ifeval ("%{a}" = "") '|varset a 0'
*script exec !ifeval ("%{a}" = "-1") '|varset from 0' else '|varset from %{a}'
*script gotoif ("$audioplayer_foobar$" = "1") fb2k
; either rewind or fast forward
*script gotoif ("%{from}" < "%{to}") wfw
*script gotoif ("%{from}" > "%{to}") wrw
*script goto done
*script label wfw
*script exec !varset cmd ffwd
*script exec !varset amt %#%{to}-%{from}%#
*script goto wpre
*script label wrw
*script exec !varset cmd rewd
*script exec !varset amt %#%{from}-%{to}%#
*script label wpre
*script exec !varset m20 %#%{amt}/20%#
*script exec !varadd amt -%#20*%{m20}%#
*script exec !varset m10 %#%{amt}/10%#
*script exec !varadd amt -%#10*%{m10}%#
*script exec !varset m5 %#%{amt}/5%#
*script exec !varadd amt -%#5*%{m5}%#
*script label wl20
*script gotoif ("%{m20}" = "0") wdr
*script exec !amp_%{cmd}20s
*script exec !varadd m20 -1
*script goto wl20
*script label wdr
*script exec !ifeval ("%{m10}" = "1") '|amp_%{cmd}10s'
*script exec !ifeval ("%{m5}" = "1") '|amp_%{cmd}5s'
;*script exec !ifeval ("%{amt}" > "2") '|amp_%{cmd}5s'
*script label done
*script exec !LabelUpdate audioInfoTime
*script label donenow
*script exit
*script label fb2k
*script exec !ifeval ("%{audiostatus}" = "Playing") '|varset unpause true' else '|varset unpause false'
*script exec !ifeval ("%{unpause}" = "true") {"$FoobarPath$" /pause}
*script gotoif ("%{from}" < "%{to}") fw
*script gotoif ("%{from}" > "%{to}") rw
*script goto done
*script label fw
*script exec !varset cmd ahead
*script exec !varset amt %#%{to}-%{from}%#
*script goto pre
*script label rw
*script exec !varset cmd back
*script exec !varset amt %#%{from}-%{to}%#
*script label pre
*script exec !varset m600 %#%{amt}/600%#
*script exec !varadd amt -%#600*%{m600}%#
*script exec !varset m300 %#%{amt}/300%#
*script exec !varadd amt -%#300*%{m300}%#
*script exec !varset m120 %#%{amt}/120%#
*script exec !varadd amt -%#120*%{m120}%#
*script exec !varset m60 %#%{amt}/60%#
*script exec !varadd amt -%#60*%{m60}%#
*script exec !varset m30 %#%{amt}/30%#
*script exec !varadd amt -%#30*%{m30}%#
*script exec !varset m10 %#%{amt}/10%#
*script exec !varadd amt -%#10*%{m10}%#
*script exec !varset m5 %#%{amt}/5%#
*script exec !varadd amt -%#5*%{m5}%#
*script exec !varset m1 %{amt}
*script label l600
*script gotoif ("%{m600}" = "0") l300
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 10 minutes"
*script exec !varadd m600 -1
*script goto l600
*script label l300
*script gotoif ("%{m300}" = "0") l120
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 5 minutes"
*script label l120
*script gotoif ("%{m120}" = "0") l60
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 2 minutes"
*script exec !varadd m120 -1
*script goto l120
*script label l60
*script gotoif ("%{m60}" = "0") l30
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 1 minute"
*script label l30
*script gotoif ("%{m30}" = "0") l10
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 30 seconds"
*script label l10
*script gotoif ("%{m10}" = "0") l5
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 10 seconds"
*script exec !varadd m10 -1
*script goto l10
*script label l5
*script gotoif ("%{m5}" = "0") l1
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 5 seconds"
*script label l1
*script gotoif ("%{m1}" = "0") l0
*script exec "$FoobarPath$" /command:"Playback/Seek %{cmd} by 1 second"
*script exec !varadd m1 -1
*script goto l1
*script label l0
*script exec !ifeval ("%{unpause}" = "true") {$maudioctrl_pause$}
*script goto done
*script ~bang