r1ch.net forums
* Home Help Search Login Register
r1ch.net  |  r1ch.net stuff  |  r1dll / foobar2000 plugins  |  Topic: My mirc code
Pages: [1]
Print
Author Topic: My mirc code  (Read 8157 times)
tiberious
Guest
« on: August 07, 2005, 05:57:39 am »

Here is my own mirc code to display the winamp information

I used the following in foobar's Winamp API Emulator title bar: [%artist% ['('%album%[':'%tracknumber%]')'] - %title%]

and used the following code in a mirc remote script file:

Code:
alias -l wadll { return $shortfn($scriptdirr1dll.dll) }
alias -l r1raw { return $dll($wadll,$+(GetCurrentWinampSong,$1),0) }

alias fb { say $iif($1,$1- to) $rmp3play }
alias rmp3play {
  if ($r1raw) {
    return ( $+ $gettok($r1raw(FileName),-1,46) $+ ) $r1raw $+($chr(91),$int($calc($r1raw(ElapsedTime)/$r1raw(TotalTime)*100)),%,$chr(47),$dur($r1raw(TotalTime)),$chr(47),$r1raw(Kbps),kbps,$chr(47),$iif($r1raw(KHz) > 1000,$round($calc($r1raw(KHz)/1000),1)),Khz,$chr(93))
  }
  else {
    return (mp3) Foobar is not Playing
  }
}
alias dur %t = $1 | return $iif(!%t,0secs,$s(604800,wk) $s(86400,d) $s(3600,h) $s(60,m) $s(1,s))
alias s %x = $int($calc(%t /$1)) | %t = %t % $1 | if (%x) return %x $+ $2

* note i did not write the original code, only modified it
* also it seems that [ code ] doesn't like to keep some of the mirc modifier codes, u can work out where they are meant to go from the example below.

which produces the following in mirc: when typing /fb

Code:
(mp3) Nine Inch Nails (With Teeth:7/13) - With Teeth [34%/5m 37s/217kbps/44.1Khz]

---
www.tiberious.org
Logged
Pages: [1]
Print
r1ch.net  |  r1ch.net stuff  |  r1dll / foobar2000 plugins  |  Topic: My mirc code
Jump to:  

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines