Guest User

Untitled

a guest
May 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. alias np {
  2.  
  3. set -N0 %dllpath winampq.dll
  4. set -N0 %command /say
  5.  
  6. ;plain
  7. set -NO %plain np; ::title:: (::bitrate::k/::frequency::Khz/::length::min)
  8.  
  9. ;plain stream
  10. set -NO %plain_stream np; ::title:: (::bitrate::k/::frequency::Khz/::length::min) // Listen at; ::file::/listen.pls
  11.  
  12. ;error
  13. set -N0 %error np; Winamp is currently turned off.
  14.  
  15. ; ** Set the ACTIVE styles here for file & stream playback as well as for error output.
  16. set -N0 %_style_normal %plain
  17. set -N0 %_style_stream %plain_stream
  18. set -N0 %_style_error %error
  19.  
  20. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  21.  
  22. set -N0 %_status $dll(%dllpath, getWinampInfo, 0)
  23. ; Winamp is off or error
  24. if ((%_status == 0) || (%_status == -1)) set -N0 %_style_normal %_style_error
  25. ; Winamp is stream
  26. if (%_status == 2) set -N0 %_style_normal %_style_stream
  27. set -N0 %_s %_style_normal
  28.  
  29. if (%_status > 0) {
  30. ; All the nifty query stuff comes here (if present only, to make this script lightning fast :>)
  31. if ($pos(%_s,::status::,1) != $null) { set -N0 %_s $replace(%_s,::status::,$dll(%dllpath,queryStatusF,0)) }
  32. if ($pos(%_s,::file::,1) != $null) { set -N0 %_s $replace(%_s,::file::,$dll(%dllpath,queryFile,0)) }
  33. if ($pos(%_s,::title::,1) != $null) { set -N0 %_s $replace(%_s,::title::,$dll(%dllpath,queryTitle,0)) }
  34. if ($pos(%_s,::type::,1) != $null) { set -N0 %_s $replace(%_s,::type::,$dll(%dllpath,queryType,0)) }
  35. if ($pos(%_s,::bitrate::,1) != $null) { set -N0 %_s $replace(%_s,::bitrate::,$dll(%dllpath,queryInfo,1)) }
  36. if ($pos(%_s,::channels::,1) != $null) { set -N0 %_s $replace(%_s,::channels::,$dll(%dllpath,queryInfo,2)) }
  37. if ($pos(%_s,::mode::,1) != $null) { set -N0 %_s $replace(%_s,::mode::,$dll(%dllpath,queryModeF,0)) }
  38. if ($pos(%_s,::frequency::,1) != $null) { set -N0 %_s $replace(%_s,::frequency::,$dll(%dllpath,queryInfo,0)) }
  39. if ($pos(%_s,::length::,1) != $null) { set -N0 %_s $replace(%_s,::length::,$dll(%dllpath,queryLengthF,0)) }
  40. if ($pos(%_s,::position::,1) != $null) { set -N0 %_s $replace(%_s,::position::,$dll(%dllpath,queryPositionF,0)) }
  41. if ($pos(%_s,::index::,1) != $null) { set -N0 %_s $replace(%_s,::index::,$dll(%dllpath,queryIndex,0)) }
  42. if ($pos(%_s,::num::,1) != $null) { set -N0 %_s $replace(%_s,::num::,$dll(%dllpath,queryNum,0)) }
  43. }
  44.  
  45. ; Strip any color codes, if we are on a channel which has mode +c!
  46. if (($pos($active,#,1) != $null) && ($poscs($chan($active).mode,c,1) != $null)) set -N0 %_s $strip(%_s,c)
  47. ; Invoke our command :)
  48. %command %_s
  49.  
  50. }
Add Comment
Please, Sign In to add comment