Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias np {
- set -N0 %dllpath winampq.dll
- set -N0 %command /say
- ;plain
- set -NO %plain np; ::title:: (::bitrate::k/::frequency::Khz/::length::min)
- ;plain stream
- set -NO %plain_stream np; ::title:: (::bitrate::k/::frequency::Khz/::length::min) // Listen at; ::file::/listen.pls
- ;error
- set -N0 %error np; Winamp is currently turned off.
- ; ** Set the ACTIVE styles here for file & stream playback as well as for error output.
- set -N0 %_style_normal %plain
- set -N0 %_style_stream %plain_stream
- set -N0 %_style_error %error
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- set -N0 %_status $dll(%dllpath, getWinampInfo, 0)
- ; Winamp is off or error
- if ((%_status == 0) || (%_status == -1)) set -N0 %_style_normal %_style_error
- ; Winamp is stream
- if (%_status == 2) set -N0 %_style_normal %_style_stream
- set -N0 %_s %_style_normal
- if (%_status > 0) {
- ; All the nifty query stuff comes here (if present only, to make this script lightning fast :>)
- if ($pos(%_s,::status::,1) != $null) { set -N0 %_s $replace(%_s,::status::,$dll(%dllpath,queryStatusF,0)) }
- if ($pos(%_s,::file::,1) != $null) { set -N0 %_s $replace(%_s,::file::,$dll(%dllpath,queryFile,0)) }
- if ($pos(%_s,::title::,1) != $null) { set -N0 %_s $replace(%_s,::title::,$dll(%dllpath,queryTitle,0)) }
- if ($pos(%_s,::type::,1) != $null) { set -N0 %_s $replace(%_s,::type::,$dll(%dllpath,queryType,0)) }
- if ($pos(%_s,::bitrate::,1) != $null) { set -N0 %_s $replace(%_s,::bitrate::,$dll(%dllpath,queryInfo,1)) }
- if ($pos(%_s,::channels::,1) != $null) { set -N0 %_s $replace(%_s,::channels::,$dll(%dllpath,queryInfo,2)) }
- if ($pos(%_s,::mode::,1) != $null) { set -N0 %_s $replace(%_s,::mode::,$dll(%dllpath,queryModeF,0)) }
- if ($pos(%_s,::frequency::,1) != $null) { set -N0 %_s $replace(%_s,::frequency::,$dll(%dllpath,queryInfo,0)) }
- if ($pos(%_s,::length::,1) != $null) { set -N0 %_s $replace(%_s,::length::,$dll(%dllpath,queryLengthF,0)) }
- if ($pos(%_s,::position::,1) != $null) { set -N0 %_s $replace(%_s,::position::,$dll(%dllpath,queryPositionF,0)) }
- if ($pos(%_s,::index::,1) != $null) { set -N0 %_s $replace(%_s,::index::,$dll(%dllpath,queryIndex,0)) }
- if ($pos(%_s,::num::,1) != $null) { set -N0 %_s $replace(%_s,::num::,$dll(%dllpath,queryNum,0)) }
- }
- ; Strip any color codes, if we are on a channel which has mode +c!
- if (($pos($active,#,1) != $null) && ($poscs($chan($active).mode,c,1) != $null)) set -N0 %_s $strip(%_s,c)
- ; Invoke our command :)
- %command %_s
- }
Add Comment
Please, Sign In to add comment