Media Displayer 4.1 — File Browser

MediaDisplayer4.1v4.1 / MediaDisplayer4.1v4.1 / media.mrc

media.mrc — 53.8 KB — Download this file

; ##################################################
; ## Media Displayer 4.1                          ##
; ##################################################
; ## by Krofinzki - http://www.krof.net           ##
; ##                                              ##
; ## gos.dll by Gos - Haven't found a page :/     ##
; ## mpcinfo.dll by Gabest - http://gabest.org    ##
; ## gtsmirc.dll by GTS, Shahid & Phaze-          ##
; ##  http://www.adv-clan.com/gts-stuff/          ##
; ##################################################
;
; Non media.* aliases used:
; /winamp /mplayer /mplayerc /vlc /bsp /zoomplay /pdvd /areader /cdisplay /url /vdub
; /stat /os /uptime /dcpp /flashfxp /ftprush /everest
; /mobo /mem /cpu /hdd /gfx /screen /sound /net <- All of these also works as identifiers ($)
;
; Rippers are loosers.
;

;-----------------
; Init

on *:LOAD:{
  media.resetvars
  media.versioncheck
  echo -a Media Displayer %media.ver by Krofinzki, Loaded
  echo -a Remember to check the media-readme.txt again before asking me.. please
}

on *:UNLOAD:{
  media.un
}

on *:QUIT:{
  uprecord -s
}

;-----------------
; Aliases

alias media.resetvars {
  .set %media.ver 4.1
  media.defaults
  media.stats.defaults
  media.vlc.defaults
}

alias media.defaults {
  .set %media.winamp listens to
  .set %media.mplayer64 watches
  .set %media.mplayerc watches
  .set %media.vlcmp watches
  .set %media.pdvd watches
  .set %media.bsp watches
  .set %media.zoomplay watches
  .set %media.areader reads
  .set %media.areader.file $true
  .set %media.cdisplay reads
  .set %media.cdisplay.file $true
  .set %media.w1 $true
  .set %media.w2 $true
  .set %media.mpc1 $true
  .set %media.mpc2 $true
  .set %media.bsp1 $true
  .set %media.bsp2 $true
  .set %media.zpl1 $true
  .set %media.zpl2 $true
  .set %media.vlc1 $true
  .set %media.vlc2 $true
  .set %media.convl $false
  .set %media.mpc.regread $false
  .set %media.url browses
  .set %media.url.domain $false
  .set %media.b 
}
alias media.stats.defaults {
  .set %media.rambar false
  .set %media.msg.os $true
  .set %media.msg.uptime $true
  .set %media.msg.cpu $true
  .set %media.msg.mem $true
  .set %media.msg.net $false
  .set %media.msg.mobo $true
  .set %media.msg.sound $false
  .set %media.msg.screen $false
  .set %media.msg.hdd $false
  .set %media.msg.hdd.2 $false
  .set %media.msg.gfx $false
  .set %media.ev.c $true
  .set %media.ev.t $true
  .set %media.ev.v $true
  .set %media.ev.f $true
  .set %media.ev.c2f $false
  .set %media.where msg $chr(36) $+ active
  .set %¨c1 0[
  .set %¨c2 0]
  .set %¨c3 2
  .set %¨c4 4
}
alias media.vlc.defaults {
  .set %media.vlc.host 127.0.0.1:8082
  .set %media.vlc.dir $null
  .set %media.vlc.ei http
}
alias media.versioncheck {
  if ($version < 6.16) { var %result = 4Failed! Your version of mirc is too old to use COM objects and thus /stat /os /mobo /mem /cpu /hdd /gfx /screen /sound /net will NOT work. Please upgrade to Version 6.16 or later. }
  else { var %result = 3Passed! }
  echo -a Version check... $version %result
}

alias winamp {
  if ($dll($scriptdir $+ gos.dll,Winamp,_) != false) {
    if ($dll($scriptdir $+ gos.dll,Winamp_Status,_) != false) { describe $active %media.winamp $+ : $+ %media.b $dll($scriptdir $+ gos.dll,Winamp,_) $+ %media.b $+ $iif(%media.w1,$chr(91) $+ $dll($scriptdir $+ gos.dll,Winamp_Time,_) $+ $chr(93) $+ $chr(32),) $+ $iif(%media.w2,( $+ $dll($scriptdir $+ gos.dll,Winamp_Bitrate,_) $+ kbps),) }
    else { describe $active %media.winamp $+ : $+ %media.b $dll($scriptdir $+ gos.dll,Winamp,_) $+ %media.b $+ $iif(%media.w1,$chr(91) $+ $dll($scriptdir $+ gos.dll,Winamp_Time,_) $+ $chr(93) $+ $chr(32),) $+ $iif(%media.w2,( $+ $dll($scriptdir $+ gos.dll,Winamp_Bitrate,_) $+ kbps),) }
  }
  else { echo -a *** Winamp is not running }
}

alias mplayer {
  if ($dll($scriptdir $+ gos.dll,Mplayer,_) != false) { 
    if ($dll($scriptdir $+ gos.dll,Mplayer,_) != $null) { describe $active %media.mplayer64 $+ : $+ %media.b $iif(%media.convl,$convl($dll($scriptdir $+ gos.dll,Mplayer,_)),$dll($scriptdir $+ gos.dll,Mplayer,_)) $+ %media.b }
    else { echo -a *** Couldn't retrive Mplayer6.4 information }
    halt
  }
  else { echo -a *** Windows Media Player 6.4 is not running }
}
alias mplayerc {
  if ($dll($scriptdir $+ mpcinfo.dll,running,) != 2) { 
    if (%media.mpc.regread == $true) {
      var %bytes = $dll($scriptdir $+ mpcinfo.dll,size,)
      describe $active %media.mplayerc $+ : $+ %media.b $iif(%media.convl,$convl($nopath($regread(HKCU\Software\Gabest\Media Player Classic\Recent File List\File1))),$nopath($regread(HKCU\Software\Gabest\Media Player Classic\Recent File List\File1))) $+ %media.b $iif(%media.mpc1,$chr(91) $+ $dll($scriptdir $+ mpcinfo.dll,pos,) $+ $chr(93),) $iif(%media.mpc2,%media.b $+ $bytes(%bytes) $+ %media.b $+ $right($bytes(%bytes).suf,2),)     
      halt  
    }
    else {
      var %bytes = $dll($scriptdir $+ mpcinfo.dll,size,)
      describe $active %media.mplayerc $+ : $+ %media.b $iif(%media.convl,$convl($nopath($nopath($dll($scriptdir $+ mpcinfo.dll,file,)))),$nopath($nopath($dll($scriptdir $+ mpcinfo.dll,file,)))) $+ %media.b $iif(%media.mpc1,$chr(91) $+ $dll($scriptdir $+ mpcinfo.dll,pos,) $+ $chr(93),) $iif(%media.mpc2,%media.b $+ $bytes(%bytes) $+ %media.b $+ $right($bytes(%bytes).suf,2),)     
      halt
    }
  }
  else { echo -a *** Media Player Classic is not running }
}
alias pdvd {
  if (($dll($scriptdir $+ gos.dll,Pdvd,_) != false) && ($dll($scriptdir $+ gos.dll,Pdvd,_) != PowerDVD)) { 
    if ($dll($scriptdir $+ gos.dll,Pdvd,_) != $null) { describe $active %media.pdvd $+ : $+ %media.b $iif(%media.convl,$convl($nopath($dll($scriptdir $+ gos.dll,Pdvd,_))),$nopath($dll($scriptdir $+ gos.dll,Pdvd,_))) $+ %media.b }
    else { echo -a *** Couldn't retrive Power DVD information }
    halt
  }
  else { echo -a *** Power DVD Player is not running }
}
alias areader {
  if (($regread(HKCU\Software\Adobe\Acrobat Reader\8.0\AVGeneral\cRecentFiles\c1\tDIText)) && (*error* !iswm $regread(HKCU\Software\Adobe\Acrobat Reader\8.0\AVGeneral\cRecentFiles\c1\tDIText))) { 
    if (%media.areader.file) { 
      describe $active %media.areader $+ : $+ %media.b $nopath($regread(HKCU\Software\Adobe\Acrobat Reader\8.0\AVGeneral\cRecentFiles\c1\tDIText)) 
    }
    else { 
      var %a = 1
      var %b = $regread(HKCU\Software\Adobe\Acrobat Reader\8.0\AVGeneral\cRecentFiles\c1\tDIText)
      while (%a <= $numtok(%b,47)) {
        if (*.pdf iswm $gettok(%b,%a,47)) { 
          describe $active %media.areader $+ : $+ %media.b $gettok(%b,$calc(%a - 1),47) $+ %media.b

        }
        inc %a
      }
    }
  }
  else { 
    echo -a $and($regread(HKCU\Software\Adobe\Acrobat Reader\6.0\AVGeneral\cRecentFiles\c1\tDIText)))
    echo -a *** Adobe Reader 8 has never ever read a .pdf file on this computer 
  }
}
alias cdisplay { 
  if (($regread(HKCU\Software\CDisplay\RecentPages\0000)) && (*error* !iswm $regread(HKCU\Software\CDisplay\RecentPages\0000))) { 
    describe $active %media.cdisplay $+ : $+ %media.b $iif(%media.cdisplay.file,$nopath($regread(HKCU\Software\CDisplay\RecentPages\0000)),$nopath($regread(HKCU\Software\CDisplay\LastDir))) $+ %media.b Page: $+ %media.b $calc($regread(HKCU\Software\CDisplay\RecentPages) + 1) $+ %media.b
  }
  else { echo -a *** CDisplay has never ever read a comic on this computer }
}
alias url {
  if (%media.url.domain) { describe $active %media.url $+ : $+ %media.b http:// $+ $gettok($url,2,47) $+ %media.b }
  else { describe $active %media.url $+ : $+ %media.b $url $+ %media.b }
}
alias vdub {
  if ($dll($scriptdir $+ gtsmirc.dll,GetVDubInfo,_) != $null) {
    var %shikidim = $dll($scriptdir $+ gtsmirc.dll,GetVDubInfo,_)
    describe $active is encoding: $+ %media.b $gettok(%shikidim,2,1) $+ %media.b with $gettok(%shikidim,12,1) $chr(91) $+ $gettok(%shikidim,13,1) $+ $chr(47) $+ $gettok(%shikidim,14,1) $gettok(%shikidim,10,1) done $+ $chr(93) Projected Size is $gettok(%shikidim,11,1)
    halt
  }
  else { echo -a *** VirtualDub is not running or isn't encoding }
}
alias bsp {
  if (($dll($scriptdir $+ gtsmirc.dll,GetOpenVideo,_) != $null) && ($gettok($dll($scriptdir $+ gtsmirc.dll,GetOpenVideo,_),12,1) == BSP)) {
    describe $active %media.bsp $+ : $+ %media.b $iif(%media.convl,$convl($gettok($dll($scriptdir $+ gtsmirc.dll,GetOpenVideo,_),3,1)),$gettok($dll($scriptdir $+ gtsmirc.dll,GetOpenVideo,_),3,1)) $+ %media.b $&
      $iif(%media.bsp1,$chr(91) $+ $gettok($dll($scriptdir $+ gtsmirc.dll,GetOpenVideo,_),4,1) $+ / $+ $gettok($dll($scriptdir $+ gtsmirc.dll,GetOpenVideo,_),5,1) $+ $chr(93),) $iif(%media.bsp2,%media.b $+ $round($calc($gettok($dll($scriptdir $+ gtsmirc.dll,GetOpenVideo,_),6,1) / 1024^2),1) $+ %media.b $+ mb,)
  }
  else { echo -a *** BSPlayer is not running, or ZoomPlayer and BSPlayer is running at the same time }
}
alias zoomplay {
  if (($dll($scriptdir $+ gtsmirc.dll,GetOpenVideo,_) != $null) && ($gettok($dll($scriptdir $+ gtsmirc.dll,GetOpenVideo,_),12,1) == ZPL)) {
    describe $active %media.zoomplay $+ : $+ %media.b $iif(%media.convl,$convl($gettok($dll($scriptdir $+ gtsmirc.dll,GetOpenVideo,_),3,1)),$gettok($dll($scriptdir $+ gtsmirc.dll,GetOpenVideo,_),3,1)) $+ %media.b $& 
      $iif(%media.zpl1,$chr(91) $+ $gettok($dll($scriptdir $+ gtsmirc.dll,GetOpenVideo,_),4,1) $+ / $+ $gettok($dll($scriptdir $+ gtsmirc.dll,GetOpenVideo,_),5,1) $+ $chr(93),) $iif(%media.bsp2,%media.b $+ $round($calc($gettok($dll($scriptdir $+ gtsmirc.dll,GetOpenVideo,_),6,1) / 1024^2),1) $+ %media.b $+ mb,)
  }
  else { echo -a *** ZoomPlayer is not running, or BSPlayer and ZoomPlayer is running at the same time }
}

alias vlc {
  if (%media.vlc.dir == $null) { set %media.vlc.dir $$sdir="Select the Directory Containing VLC Media Player (vlc.exe) " C:\ $+ http\ }
  if ($file(%media.vlc.dir != 0)) {
    echo -a *** Information couldn't be loaded, you probably chose the wrong directory for VLC Media Player. Type in /vlc again
    .unset %media.vlc.dir
    halt
  }
  var %ini = $envar(appdata) $+ \vlc\vlcrc
  if (!$file(%media.vlc.dir $+ \NowPlaying.htm)) { vlc.writefile }
  if ($file(%ini)) { 
    if ($read(%ini, w, *#extraintf=*)) { write -l $+ $readn " $+ %ini $+ " extraintf=http | echo -a *** Enabled extra interfaces | var %changes $true }
    if (%media.vlc.ei != $readini(%ini, main, extraintf)) { writeini -n " $+ %ini $+ " main extraintf %media.vlc.ei | echo -a *** Set extraintf to %media.vlc.ei | var %changes $true }
    if (%media.vlc.host != $readini(%ini, http, http-host)) { writeini -n " $+ %ini $+ " http http-host %media.vlc.host | echo -a *** Set http-host to %media.vlc.host | var %changes $true }
    if (%media.vlc.dir != $readini(%ini, http, http-src)) { writeini -n " $+ %ini $+ " http http-src %media.vlc.dir | echo -a *** Set http-src tp %media.vlc.dir | var %changes $true }
    if (%changes) { echo -a *** IMPORTANT: If you where running VLC right now, these change won't go through. Please turn off VLC and type in /vlc again if this is the case }
  }
  if ($1 != -e) { sockopen vlc_meta_info $replace(%media.vlc.host,:,$chr(32)) }
}

alias vlc.writefile {
  if ($1 == -d) { 
    remove " $+ %media.vlc.dir $+ NowPlaying.htm"
    echo -a *** NowPlaying.htm removed. Now generating a new one...
  }
  if ($file(%media.vlc.dir $+ NowPlaying.htm) > 0) { echo -a *** NowPlaying.htm already exists. If the script doesn't work, delete NowPlaying.htm and try again. You can remove the file by typing /vlc.writefile -d | halt }
  write " $+ %media.vlc.dir $+ NowPlaying.htm" <vlc id="foreach" param1="pl" param2="playlist" />
  write " $+ %media.vlc.dir $+ NowPlaying.htm" <vlc id="if" param1="pl.current" />
  write " $+ %media.vlc.dir $+ NowPlaying.htm" FILENAME="<vlc id="value" param1="pl.uri" />"
  write " $+ %media.vlc.dir $+ NowPlaying.htm" <vlc id="end" />
  write " $+ %media.vlc.dir $+ NowPlaying.htm" <vlc id="end" />
  write " $+ %media.vlc.dir $+ NowPlaying.htm" SEC_ELAPSED=<vlc id="value" param1="stream_time" />
  write " $+ %media.vlc.dir $+ NowPlaying.htm" SEC_TOTAL=<vlc id="value" param1="stream_length" />
  write " $+ %media.vlc.dir $+ NowPlaying.htm" THE_END
  echo -a *** NowPlaying.htm generated.
}
on *:SOCKOPEN:vlc_meta_info: {
  if ($sockerr > 0) { echo -a *** VLC media player is not running | halt }
  sockwrite -n $sockname GET /NowPlaying.htm HTTP/1.1
  sockwrite -n $sockname Host: localhost
  sockwrite -n $sockname $crlf
  sockwrite -n $sockname $null
}
on *:SOCKREAD:vlc_meta_info: {
  if ($sockerr > 0) { echo -a *** Socket Error | return }
  var %temp = $null
  :nextread
  sockread %temp
  if ($sockbr == 0) { return }
  if (%temp == $null) { var %temp --- }
  if (FILENAME=* iswm %temp) {
    .set %media.vlct.filename $remove(%temp,FILENAME=)
  }
  if (SEC_ELAPSED=* iswm %temp) {
    .set %media.vlct.elapsed $remove(%temp,SEC_ELAPSED=)
  }
  if (SEC_TOTAL=* iswm %temp) {
    .set %media.vlct.total $remove(%temp,SEC_TOTAL=)
  }
  if (THE_END isin %temp) { 
    if (%media.vlct.total == 0) { echo -a *** VLC media player is not playing anything }
    else { describe $active %media.vlcmp $+ : $+ %media.b $nopath(%media.vlct.filename) $+ %media.b $iif(%media.vlc1,$chr(91) $+ $duration(%media.vlct.elapsed,3) $+ / $+ $duration(%media.vlct.total,3) $+ $chr(93),) $iif(%media.vlc2,%media.b $+ $bytes($file(%media.vlct.filename).size) $+ %media.b $+ $right($bytes($file(%media.vlct.filename).size).suf,2),) }
    .unset %media.vlct.*
    sockclose vlc_meta_info 
    halt
  }
  goto nextread
}

alias flashfxp {
  if (%media.ffxp == $null) { set %media.ffxp $sdir="Select the Directory Containing FlashFXP" C:\ $+ stats.dat }
  if (!$file(%media.ffxp) ) {
    echo -a *** Stats couldn't be loaded, you probably chose the wrong directory for FlashFXP. Type in /flashfxp again
    .unset %media.ffxp
    halt
  }
  if (%media.ffxp.date == $null) { set %media.ffxp.date $asctime($calc(($left($readini(%media.ffxp,#Total#,LR),5) - 25569) * 86400),yyyy-mm-dd) }
  var %down = $readini(%media.ffxp,#total#,FD)
  var %up = $readini(%media.ffxp,#total#,FU)
  var %fxp = $readini(%media.ffxp,#total#,X)
  [ [ %media.where ] ] %¨c3 $+ flashfxp $+ %¨c1 $+ $bytes(%down).suf downloaded, $bytes(%up).suf uploaded ( $+ $round($calc(%up / %down),2) ratio), $bytes(%fxp).suf fxpd ( $+ $bytes($calc(%fxp * 3)).suf credits) - Since %media.ffxp.date $+ %¨c2
}
alias ftprush {
  if (%media.ftpr == $null) { set %media.ftpr $sdir="Select the Directory Containing FTPRush" C:\ $+ RushCfg.xml }
  if (!$file(%media.ftpr) ) {
    echo -a *** Stats couldn't be loaded, you probably chose the wrong directory for FTPRush. Type in /ftprush again
    .unset %media.ftpr
    halt
  }
  var %down = $gettok($gettok($read(%media.ftpr,w,*<TSTATS*),4,32),2,34)
  var %up = $gettok($gettok($read(%media.ftpr,w,*<TSTATS*),3,32),2,34)
  var %fxp = $gettok($gettok($read(%media.ftpr,w,*<TSTATS*),5,32),2,34)
  var %d = $gettok($gettok($read(%media.ftpr,w,*<TSTATS*),2,32),2,34)
  var %date = $date($ctime($and($calc(%d /65536),31) $+ $chr(47) $+ $and($calc(%d /2097152),15) $+ $chr(47) $+ $left($calc(%d /33554432 +1980),4)),yyyy-mm-dd)
  [ [ %media.where ] ] %¨c3 $+ ftprush $+ %¨c1 $+ $bytes(%down).suf downloaded, $bytes(%up).suf uploaded ( $+ $round($calc(%up / %down),2) ratio), $bytes(%fxp).suf fxpd ( $+ $bytes($calc(%fxp * 3)).suf credits) - Since %date $+ %¨c2
}
alias dcpp {
  if (%media.dcpp == $null) { set %media.dcpp $sdir="Select the Directory Containing DC++" C:\ $+ DCPlusPlus.xml }
  if (!$file(%media.dcpp) ) {
    echo -a *** Stats couldn't be loaded, you probably chose the wrong directory for DC++. Type in /dcpp again
    .unset %media.dcpp
    halt
  }
  var %down = $remove($gettok($read(%media.dcpp,w,*<TotalDownload*),2,62),</TotalDownload)
  var %up = $remove($gettok($read(%media.dcpp,w,*<TotalUpload*),2,62),</TotalUpload)
  [ [ %media.where ] ] %¨c3 $+ dc++ $+ %¨c1 $+ $bytes(%down).suf downloaded, $bytes(%up).suf uploaded ( $+ $round($calc(%up / %down),2) ratio) $+ %¨c2
}

alias evread {
  ; $1 = SCPUMUL
  ; C -> F  if (%media.ev.f = $true) {  }
  if (*error* iswm $regread(HKCU\Software\Lavalys\EVEREST\SensorValues\Value. $+ $1)) { var %result = ? }
  else { 
    if ($2 == t) {
      if (%media.ev.c2f == $true) { 
        var %result = $round($calc(($regread(HKCU\Software\Lavalys\EVEREST\SensorValues\Value. $+ $1) * 1.8)+32),0) $+ $chr(176) $+ F
      }
      else { var %result = $regread(HKCU\Software\Lavalys\EVEREST\SensorValues\Value. $+ $1) $+ $chr(176) $+ C }
    }
    else { var %result = $regread(HKCU\Software\Lavalys\EVEREST\SensorValues\Value. $+ $1) }
  }
  return %result
}

alias everest {
  if (*error* iswm $regread(HKCU\Software\Lavalys\EVEREST\SensorValues\Value.SCPUCLK)) { echo -a * Either Everest isn't running or you haven't enabled "External Applications: Write to registry" in Everest | halt }
  if (*-* iswm $1-) { 
    if (-*c* iswm $1-) { var %values = %values %¨c3 $+ clocks $+ %¨c1 $+ CPU $evread(SCPUMUL) x $evread(SCPUFSB) $+ Mhz = $evread(SCPUCLK) $+ Mhz, Memory: $evread(SMEMCLK) $+ Mhz, GPU: $evread(SGPU1CLK) $+ Mhz, GPU Memory: $evread(SGPU1MEMCLK) $+ Mhz $+ %¨c2 }
    if (-*t* iswm $1-) { var %values = %values %¨c3 $+ temperatures $+ %¨c1 $+ Motherboard $evread(TMOBO,t) $+ , CPU $evread(TCPU,t) (Core 1: $evread(TCC-1-1,t) $+ , Core 2: $evread(TCC-1-2,t) $+ ), GPU $evread(TGPU1,t) $+ , GPU Ambient $evread(TGPU1AMB,t) $+  $+ %¨c2 }
    if (-*v* iswm $1-) { var %values = %values %¨c3 $+ voltages $+ %¨c1 $+ CPU $evread(VCPU) $+ V, +3.3V @ $evread(V33V) $+ V, +12V @ $evread(VP12V) $+ V, +5V @ $evread(V5VSB) $+ V, DIMM $evread(VDIMM) $+ V $+ $+ %¨c2 }
    if (-*f* iswm $1-) { var %values = %values %¨c3 $+ fans $+ %¨c1 $+ CPU $evread(FCPU) $+ RPM, Power Supply $evread(FPSU) $+ RPM $+ %¨c2 }
    [ [ $iif($isid,return,%media.where) ] ] %values
    halt
  }
  if (%media.ev.c) { var %values = %values %¨c3 $+ clocks $+ %¨c1 $+ CPU $evread(SCPUMUL) x $evread(SCPUFSB) $+ Mhz = $evread(SCPUCLK) $+ Mhz, Memory: $evread(SMEMCLK) $+ Mhz, GPU: $evread(SGPU1CLK) $+ Mhz, GPU Memory: $evread(SGPU1MEMCLK) $+ Mhz $+ %¨c2 }
  if (%media.ev.t) { var %values = %values %¨c3 $+ temperatures $+ %¨c1 $+ Motherboard $evread(TMOBO,t) $+ , CPU $evread(TCPU,t) (Core 1: $evread(TCC-1-1,t) $+ , Core 2: $evread(TCC-1-2,t) $+ ), GPU $evread(TGPU1,t) $+ , GPU Ambient $evread(TGPU1AMB,t) $+  $+ %¨c2 }
  if (%media.ev.v) { var %values = %values %¨c3 $+ voltages $+ %¨c1 $+ CPU $evread(VCPU) $+ V, +3.3V @ $evread(V33V) $+ V, +12V @ $evread(VP12V) $+ V, +5V @ $evread(V5VSB) $+ V, DIMM $evread(VDIMM) $+ V $+ $+ %¨c2 }
  if (%media.ev.f) { var %values = %values %¨c3 $+ fans $+ %¨c1 $+ CPU $evread(FCPU) $+ RPM, Power Supply $evread(FPSU) $+ RPM $+ %¨c2 }
  if (%values == $null) { 
    echo -a *** You haven't selected any output for /everest. Do so in /media.options.dialog ("Options - PC Stats")
    halt
  }
  [ [ $iif($isid,return,%media.where) ] ] %values
}

alias stat { 
  os -r
  uptime -r
  [ [ %media.where ] ] $iif(%media.msg.os,%media.stat.os,) $iif(%media.msg.uptime,%media.stat.up,) $iif(%media.msg.mobo,$mobo,) $iif(%media.msg.cpu,$cpu,) $iif(%media.msg.mem,$mem,) $iif(%media.msg.hdd,$hdd,) $iif(%media.msg.gfx,$gfx,) $iif(%media.msg.screen,$screen,) $iif(%media.msg.sound,$sound,) $iif(%media.msg.ni,$ni,) 
  .unset %media.stat.*
}
alias os { [ [ $iif($1 == -r,.set %media.stat.os,%media.where) ] ] %¨c3 $+ os $+ %¨c1 $+ $remove($wmiget(Win32_OperatingSystem).Caption,Microsoft $+ $chr(32)) $+ , $replace($wmiget(Win32_OperatingSystem).CSDVersion,Service Pack,SP) ( $+ $wmiget(Win32_OperatingSystem).Version $+ ) $+ %¨c2 }
alias uptime { [ [ $iif($1 == -r,.set %media.stat.up,%media.where) ] ] %¨c3 $+ uptime $+ %¨c1 $+ $uptime(system,1) $+ %¨c2 %¨c3 $+ record $+ %¨c1 $+ $uprecord $+ %¨c2 }
alias uprecord { 
  if (($gettok(%media.record,1,32) <= $uptime(system,3)) || (%media.record == $null)) { 
    .set %media.record $uptime(system,3) $uptime(system,1) 
    if ($1 == -s) { halt }
  }
  return $gettok(%media.record,2-,32)
}
alias cpu { [ [ $iif($isid,return,%media.where) ] ] %¨c3 $+ cpu $+ %¨c1 $+ $wmiget(Win32_ComputerSystem).NumberOfProcessors $+ x $remove($wmiget(Win32_Processor).Name,(TM),(R),@) @ $+($wmiget(Win32_Processor).CurrentClockSpeed,MHz) $iif($chr(40) $+ $wmiget(Win32_Processor).LoadPercentage,$+($ifmatch,% Load $+ $chr(41)),) $+ %¨c2 }
alias mem {   
  var %rb.rammax = $round($calc($wmiget(Win32_LogicalMemoryConfiguration).TotalPhysicalMemory / 1024),1)
  var %rb.ramuse = $round($calc($wmiget(Win32_OperatingSystem).FreePhysicalMemory / 1024),1)
  [ [ $iif($isid,return,%media.where) ] ] %¨c3 $+ mem $+ %¨c1 $+ $+($round($calc(%rb.rammax - %rb.ramuse),0),/,%rb.rammax,MB) $+($chr(40),$round($calc((%rb.rammax - %rb.ramuse) / %rb.rammax * 100),2),%,$chr(41)) $+ $iif(%media.rambar == true,,$chr(32) $+ $rambar($round($calc((%rb.rammax - %rb.ramuse) / %rb.rammax * 100),2))) $+ %¨c2 
}
alias hdd { 
  var %i = 1
  var %free = 0
  var %total = 0
  if (%media.msg.hdd.2 == $false) { 
    while (%i <= $disk(0)) { 
      if (($disk(%i).type == fixed) && (!$disk(%i).unc)) { 
        var %free = $calc(%free + $bytes($disk(%i).free,g))
        var %total = $calc(%total + $bytes($disk(%i).size,g)) 
      }
      inc %i 
    }
    [ [ $iif($isid,return,%media.where) ] ] %¨c3 $+ hdd $+ %¨c1 $+ %free $+ GB Free, %total $+ GB Total $+ %¨c2
    halt
  }
  if (%media.msg.hdd.2 == $true) { 
    while (%i <= $disk(0)) { 
      if (($disk(%i).type == fixed) && (!$disk(%i).unc)) { var %disks %disks $disk(%i).path $+($bytes($disk(%i).free).suf,/,$bytes($disk(%i).size).suf) }
      inc %i 
    }
    [ [ $iif($isid,return,%media.where) ] ] %¨c3 $+ hdd $+ %¨c1 $+ %disks $+ %¨c2
  }
}
alias gfx { [ [ $iif($isid,return,%media.where) ] ] %¨c3 $+ gfx $+ %¨c1 $+ $wmiget(Win32_VideoController).Name $bytes($wmiget(Win32_VideoController).AdapterRam,3).suf $+ %¨c2 }
alias screen { [ [ $iif($isid,return,%media.where) ] ] %¨c3 $+ screen $+ %¨c1 $+ $wmiget(Win32_DesktopMonitor).Name $+($wmiget(Win32_VideoController).currenthorizontalresolution,x,$wmiget(Win32_VideoController).currentverticalresolution) $wmiget(Win32_VideoController).currentbitsperpixel $+ bit $+ %¨c2 }
alias net { [ [ $iif($isid,return,%media.where) ] ] %¨c3 $+ net $+ %¨c1 $+ $remove($wmiget(Win32_PerfRawData_Tcpip_NetworkInterface).Name, - Packet Scheduler Miniport,Controller) ( $+ $calc($wmiget(Win32_PerfRawData_Tcpip_NetworkInterface).CurrentBandwidth / 1000000) $+ MB/s) $bytes($wmiget(Win32_PerfRawData_Tcpip_NetworkInterface).BytesReceivedPersec).suf In, $bytes($wmiget(Win32_PerfRawData_Tcpip_NetworkInterface).BytesSentPersec).suf Out $+ %¨c2 }
alias mobo { [ [ $iif($isid,return,%media.where) ] ] %¨c3 $+ mobo $+ %¨c1 $+ $gettok($wmiget(Win32_BaseBoard).Manufacturer,1,32) $wmiget(Win32_BaseBoard).Product $+ %¨c2 }
alias sound { [ [ $iif($isid,return,%media.where) ] ] %¨c3 $+ sound $+ %¨c1 $+ $wmiget(Win32_SoundDevice).Name $+ %¨c2 }

;-----------------
; Misc

; Snippet made by ems
alias regread {
  if ($1 != $null) {
    var %a = regread
    .comopen %a WScript.Shell
    if !$comerr {
      var %b =  $com(%a,RegRead,3,bstr,$1-)
      var %c = $com(%a).result
      .comclose %a
      if (%c != $null) return %c
      else {
        return error! when reading or key does not exist
      }
    }
  }
  else { return error! complete data }
}

; Snippet made by hm2k
alias wmiget {
  var %com = cominfo, %com2 = cominfo2, %com3 = cominfo3
  if ($com(%com)) { .comclose %com }
  if ($com(%com2)) { .comclose %com2 }
  if ($com(%com3)) { .comclose %com3 }
  .comopen %com WbemScripting.SWbemLocator
  var %x = $com(%com,ConnectServer,3,dispatch* %com2), %x = $com(%com2,ExecQuery,3,bstr*,select $prop from $1,dispatch* %com3), %x = $comval(%com3,$iif($2,$2,1),$prop)
  if ($com(%com)) { .comclose %com }
  if ($com(%com2)) { .comclose %com2 }
  if ($com(%com3)) { .comclose %com3 }
  return %x
}
; Snippet made by FiberOPtics - Reads Windows Enviorment variables
alias envar {
  var %a = a $+ $ticks, %b
  .comopen %a wscript.shell
  if $comerr { return COM Error }
  %b = $com(%a,expandenvironmentstrings,1,bstr*,% $+ $1%)
  %b = $com(%a).result
  .comclose %a
  return %b
}

; The famous moo rambar
alias rambar {
  if ($len($1) < 990) {
    var %rb.size = 10
    var %rb.used = $round($calc($1 / 100 * %rb.size),0)
    var %rb.unused = $round($calc(%rb.size - %rb.used),0)
    var %rb.usedstr = $str(4|,%rb.used)
    var %rb.unusedstr = $str(-,%rb.unused)
    if ((%rb.usedstr) && (%rb.unusedstr)) return $+([,%rb.usedstr,%rb.unusedstr,])
  }
}
alias convl {
  if ($isid) { 
    var %l = 1,%i = $1-
    while (%l <= $numtok(%i,32)) {
      var %convr = [ [ %convr ] ] $+($left($gettok(%i,%l,32),1),$lower($right($gettok(%i,%l,32),-1)))
      inc %l
    }
    return %convr
  }
}
alias media.un { 
  if (%removalinprogress) { halt }
  var %ver = %media.ver
  set %removalinprogress $true
  if ($?!="Do you want script files removed? $crlf  $crlf $+ media.mrc $crlf $+ gos.dll $crlf $+ mpcinfo.dll $crlf $+ gtsmirc.dll $crlf $+ colors.bmp" == $true) { 
    media.remove.vars
    remove " $+ $scriptdir $+ media.mrc $+ "
    remove " $+ $scriptdir $+ gos.dll $+ "
    remove " $+ $scriptdir $+ mpcinfo.dll $+ "
    remove " $+ $scriptdir $+ gtsmirc.dll $+ "
    remove " $+ $scriptdir $+ colors.bmp $+ "
    echo -a Media Displayer %ver by Krofinzki, Unloaded and Removed
    .timerremovethatevilvariable 1 10 /.unset %removalinprogress
    .unload -rs media.mrc
    halt
  }
  else { 
    media.remove.vars
    echo -a Media Displayer %ver by Krofinzki, Unloaded 
    .timerremovethatevilvariable 1 10 /.unset %removalinprogress
    .unload -rs media.mrc
  }
}
alias media.remove.vars {
  echo -a 2* Unsetting variables ( $+ $chr(37) $+ media.*, $chr(37) $+ "c*)
  .unset %media.*
  .unset %¨c1
  .unset %¨c2
  .unset %¨c3
  .unset %¨c4
}

alias media.get {
  var %a = $$1
  if ($get(%a).file != $null) { 
    var %bytes = $get(%a).cps
    describe $active gets  $+ $get(%a).file $+  from $get(%a) with the speed of $bytes(%bytes) $+  $+ $right($bytes(%bytes).suf,2) $+ s [ $+  $+ $get(%a).pc $+ % of $bytes($get(%a).size) $+  $+ $right($bytes($get(%a).size).suf,2) $+ ]
  }
  else { echo -a *** There's no download with that number }
}
alias media.send {
  var %a = $$1
  if ($get(%a).file != $null) { 
    describe $active sends  $+ $send(%a).file $+  to $send(%a) with the speed of $round($calc($send(%a).cps / 1024),2) $+ kb's [ $+  $+ $send(%a).pc $+ % of $round($calc($send(%a).size / 1024^2),2) $+ mb]
  }
  else { echo -a *** There's no send with that number }
}

;-----------------
; Menus

menu channel,query,menubar {
  Media Displayer
  .Display Winamp:{ winamp }
  .Display Mplayer64:{ mplayer }
  .Display MplayerC:{ mplayerc }
  .Display VLC Media Player:{ vlc }
  .Display BSPlayer:{ bsp }
  .Display ZoomPlayer:{ zoomplay }
  .Display PowerDVD:{ pdvd }
  .Display CDisplay:{ cdisplay }
  .Display Virtualdub:{ vdub }
  .Display Current URL:{ url }
  .Display Get stats for file
  ..$$get(1).file:{ media.get 1 }
  ..$$get(2).file:{ media.get 2 }
  ..$$get(3).file:{ media.get 3 }
  ..$$get(4).file:{ media.get 4 }
  ..$$get(5).file:{ media.get 5 }
  ..$$get(6).file:{ media.get 6 }
  ..$$get(7).file:{ media.get 7 }
  ..$$get(8).file:{ media.get 8 }
  ..$$get(9).file:{ media.get 9 }
  ..$$get(10).file:{ media.get 10 }
  .Display Send stats for file
  ..$$send(1).file:{ media.send 1 }
  ..$$send(2).file:{ media.send 2 }
  ..$$send(3).file:{ media.send 3 }
  ..$$send(4).file:{ media.send 4 }
  ..$$send(5).file:{ media.send 5 }
  ..$$send(6).file:{ media.send 6 }
  ..$$send(7).file:{ media.send 7 }
  ..$$send(8).file:{ media.send 8 }
  ..$$send(9).file:{ media.send 9 }
  ..$$send(10).file:{ media.send 10 }
  .-
  .PC Stats
  ..All:{ stat }
  ..-
  ..OS:{ os }
  ..Uptime:{ uptime }
  ..Cpu:{ cpu }
  ..Memory (RAM):{ mem }
  ..Motherboard:{ mobo }
  ..Harddrive space:{ hdd }
  ..Graphics Card:{ gfx }
  ..Screen:{ screen }
  ..Sound Card:{ sound }
  ..Network Interface:{ net }
  .Everest
  ..All:{ everest }
  ..-
  ..Clocks:{ everest -c }
  ..Temperatures:{ everest -t }
  ..Voltages:{ everest -v }
  ..Fans:{ everest -f }
  .DC++ Stats:{ dcpp }
  .FlashFXP Stats:{ flashfxp }
  .FTPRush Stats:{ ftprush  }
  .-
  .Options
  ..Media Stats:{ media.options.dialog }
  ..PC Stats:{ media.stats.dialog }
  ..VLC Extra interfaces:{ media.vlc.dialog }
  .About:{ media.about.dialog }
  .Advertise:{ msg $active Media Displayer %media.ver - http://www.mircscripts.org/comments.php?id=1736 - Show off your media today (and get sued by MPAA)  }
}


;-----------------
; Dialogs

alias media.about.dialog { dialog -m media.about media.about }
alias media.options.dialog { dialog -m media.options media.options }
alias media.stats.dialog { dialog -m media.stats media.stats }
alias media.vlc.dialog { dialog -m media.vlc media.vlc }

dialog media.about {
  title "About"
  size -1 -1 132 139
  option dbu
  text "", 1, 2 3 126 8, center
  box "Credits", 2, 2 39 128 84
  button "Ok", 3, 93 126 37 12, ok
  text "Krofinzki - Scripting", 4, 6 48 49 8
  text "Gos - Gos.dll", 5, 6 57 33 8
  link "Media displayer @ ms.org", 7, 3 127 63 8
  text "Zev - Lots of help with different functions", 8, 6 93 103 8
  text "Mark - Moo.dll (not used anymore)", 9, 6 75 85 8
  text "Got a dll that retrieves info from any other great program that should be supported ? Contact me !", 11, 5 16 121 14
  text "/ Krofinzki", 12, 100 30 25 8
  text "Gabest - mpcinfo.dll", 13, 6 66 49 8
  text "ems - RegRead snippet", 6, 6 102 80 8
  text "GTS, Shahid and Phaze - gtsmirc.dll", 10, 6 84 88 8
  text "All of you - Without you, no script :-)", 14, 6 111 114 8
  button "Button", 15, 122 31 1 1
}

on *:DIALOG:media.about:INIT:0:{ did -ca media.about 1 Media Displayer %media.ver }
on *:DIALOG:media.about:SCLICK:7:{ run http://www.mircscripts.org/comments.php?id=1736 }
on *:DIALOG:media.about:SCLICK:15:{ dialog -om do-not do-not }
on *:DIALOG:do-not:SCLICK:1:{ dialog -om n00 n00 }
on *:DIALOG:n00:SCLICK:2:{ 
  echo -a 2,2######1,1############2,2################1,1####7,7########1,1####2,2########
  echo -a 2,2####1,1##4,4############1,1####2,2##########1,1########7,7####1,1########2,2######
  echo -a 2,2##1,1##4,4##################1,1##2,2##########1,1##15,15##1,1##7,7####1,1##15,15##1,1##2,2########
  echo -a 2,2##1,1######7,7####1,1##7,7##1,1######2,2##########1,1##7,7##15,15####1,1####15,15####7,7##1,1##2,2######
  echo -a 1,1##7,7####1,1####7,7##1,1##7,7########1,1##2,2####1,1####7,7####15,15##1,1##7,7####1,1##15,15##7,7####1,1####2,2##
  echo -a 1,1##7,7####1,1####7,7####1,1##7,7######1,1##2,2##1,1##7,7########15,15##1,1##7,7####1,1##15,15##7,7########1,1##
  echo -a 2,2##1,1####7,7######1,1##########2,2####1,1##7,7############################1,1##
  echo -a 2,2####1,1####7,7##########1,1##2,2######1,1##7,7####15,15##1,1################15,15##7,7####1,1##
  echo -a 2,2##1,1##4,4####1,1####4,4####1,1##2,2##########1,1##7,7##15,15##7,7################15,15##7,7##1,1##2,2##
  echo -a 1,1##4,4########1,1####4,4####1,1##2,2##########1,1########################2,2####
  echo -a 1,1##4,4########1,1##########2,2################1,1##15,15##########1,1##2,2########
  echo -a 2,2##1,1##7,7######1,1####7,7##1,1####2,2########1,1########15,15############7,7##1,1##2,2######
  echo -a 2,2##1,1##7,7####4,4######1,1######2,2######1,1##7,7##1,1########15,15########7,7##1,1########2,2##
  echo -a 2,2####1,1##4,4##########1,1##2,2########1,1############7,7########1,1########7,7##1,1##
  echo -a 2-
}
dialog do-not { 
  title "DONT" 
  size -1 -1 86 42 
  option dbu 
  button "DO NOT PUSH", 1, 6 5 74 31, multi ok 
}
dialog n00 {
  title "NOOOOOOOOOOOOOOO"
  size -1 -1 68 36
  option dbu
  text "WHY DID YOU PUSH ?!?! ?!?!!!!!!!!!!!!!!!!!!!!!111", 1, 3 3 62 15
  button "SORRY", 2, 10 21 47 12, ok
}

dialog media.options {
  title "Options"
  size -1 -1 211 183
  option dbu
  edit "", 1, 47 5 70 10, autohs
  edit "", 2, 47 17 70 10, autohs
  text "Winamp", 3, 5 6 25 8
  text "Mplayer 6.4", 4, 5 18 29 8
  text "PowerDVD", 5, 5 80 25 8
  edit "", 6, 47 79 70 10, autohs
  box "", 7, 2 -1 119 150
  button "Ok", 9, 172 169 37 12, ok
  text "This is what comes after your nick, and before what your listening to/watching.", 10, 5 132 112 15
  button "Defaults", 11, 133 169 37 12
  text "Mplayer Classic", 12, 5 30 38 8
  edit "", 13, 47 29 70 10, autohs
  box "", 8, 123 -1 86 150
  check "Current/Total", 14, 127 6 45 10
  check "Bitrate", 15, 174 6 29 10
  check "Current/Total", 16, 127 30 44 10
  check "Size", 17, 174 30 23 10
  text "Extended information about the current file / Options.", 18, 126 132 80 16
  text "CDisplay", 19, 5 106 25 8
  edit "", 20, 47 105 70 10, autohs
  check "Read from File instead of Dir", 21, 127 105 80 10
  check "Convert video-filenames to Large Case", 22, 4 161 106 10
  text "BSPlayer", 23, 5 54 25 8
  text "ZoomPlayer", 24, 5 67 29 8
  edit "", 25, 47 66 70 10, autohs
  edit "", 26, 47 53 70 10, autohs
  check "Current/Total", 27, 127 54 44 10
  check "Size", 28, 174 54 23 10
  check "Current/Total", 29, 127 67 44 10
  check "Size", 30, 174 67 23 10
  check "Alternative Mplayerc file-information retrival", 31, 4 171 119 10
  text "Adobe Reader", 32, 5 93 35 8, disable
  edit "", 33, 47 92 70 10, disable autohs
  check "Read from File instead of Dir", 34, 127 92 80 10, disable
  text "Current URL", 35, 5 119 33 8
  edit "", 36, 47 118 70 10, autohs
  check "Show domain only", 37, 127 118 56 10
  text "VLC Media Player", 38, 5 42 41 8
  edit "", 39, 47 41 70 10, autohs
  check "Current/Total", 40, 127 42 44 10
  check "Size", 41, 174 42 23 10
  check "Use bold", 42, 4 151 33 10
}

on *:DIALOG:media.options:INIT:0:{
  did -a media.options 1 %media.winamp
  did -a media.options 2 %media.mplayer64
  did -a media.options 13 %media.mplayerc
  did -a media.options 39 %media.vlcmp
  did -a media.options 6 %media.pdvd
  did -a media.options 33 %media.areader
  did -a media.options 20 %media.cdisplay
  did -a media.options 26 %media.bsp
  did -a media.options 25 %media.zoomplay
  did -a media.options 36 %media.url
  if (%media.w1 == $true) { did -c media.options 14 }
  if (%media.w1 == $false) { did -u media.options 14 }
  if (%media.w2 == $true) { did -c media.options 15 }
  if (%media.w2 == $false) { did -u media.options 15 }
  if (%media.mpc1 == $true) { did -c media.options 16 }
  if (%media.mpc1 == $false) { did -u media.options 16 }
  if (%media.mpc2 == $true) { did -c media.options 17 }
  if (%media.mpc2 == $false) { did -u media.options 17 }
  if (%media.vlc1 == $true) { did -c media.options 40 }
  if (%media.vlc1 == $false) { did -u media.options 40 }
  if (%media.vlc2 == $true) { did -c media.options 41 }
  if (%media.vlc2 == $false) { did -u media.options 41 }
  if (%media.bsp1 == $true) { did -c media.options 27 }
  if (%media.bsp1 == $false) { did -u media.options 27 }
  if (%media.bsp2 == $true) { did -c media.options 28 }
  if (%media.bsp2 == $false) { did -u media.options 28 }
  if (%media.zpl1 == $true) { did -c media.options 29 }
  if (%media.zpl1 == $false) { did -u media.options 29 }
  if (%media.zpl2 == $true) { did -c media.options 30 }
  if (%media.zpl2 == $false) { did -u media.options 30 }
  if (%media.areader.file == $true) { did -c media.options 34 }
  if (%media.areader.file == $false) { did -u media.options 34 }
  if (%media.cdisplay.file == $true) { did -c media.options 21 }
  if (%media.cdisplay.file == $false) { did -u media.options 21 }
  if (%media.convl == $true) { did -c media.options 22 }
  if (%media.convl == $false) { did -u media.options 22 }
  if (%media.mpc.regread == $true) { did -c media.options 31 }
  if (%media.mpc.regread == $false) { did -u media.options 31 }
  if (%media.url.domain == $true) { did -c media.options 37 }
  if (%media.url.domain == $false) { did -u media.options 37 }
  if (%media.b == ) { did -c media.options 42 }
  if (%media.b == $null) { did -u media.options 42 }
}
on *:DIALOG:media.options:EDIT:1:{ .set %media.winamp $did(media.options,1) }
on *:DIALOG:media.options:EDIT:2:{ .set %media.mplayer64 $did(media.options,2) }
on *:DIALOG:media.options:EDIT:13:{ .set %media.mplayerc $did(media.options,13) }
on *:DIALOG:media.options:EDIT:39:{ .set %media.vlcmp $did(media.options,39) }
on *:DIALOG:media.options:EDIT:6:{ .set %media.pdvd $did(media.options,6) }
on *:DIALOG:media.options:EDIT:33:{ .set %media.areader $did(media.options,33) }
on *:DIALOG:media.options:EDIT:20:{ .set %media.cdisplay $did(media.options,20) }
on *:DIALOG:media.options:EDIT:26:{ .set %media.bsp $did(media.options,26) }
on *:DIALOG:media.options:EDIT:25:{ .set %media.zoomplay $did(media.options,25) }
on *:DIALOG:media.options:EDIT:36:{ .set %media.url $did(media.options,36) }
on *:DIALOG:media.options:SCLICK:14:{
  if ($did(media.options,14).state == 1 ) { set %media.w1 $true }
  if ($did(media.options,14).state == 0 ) { set %media.w1 $false }
}
on *:DIALOG:media.options:SCLICK:15:{
  if ($did(media.options,15).state == 1 ) { set %media.w2 $true }
  if ($did(media.options,15).state == 0 ) { set %media.w2 $false }
}
on *:DIALOG:media.options:SCLICK:16:{
  if ($did(media.options,16).state == 1 ) { set %media.mpc1 $true }
  if ($did(media.options,16).state == 0 ) { set %media.mpc1 $false }
}
on *:DIALOG:media.options:SCLICK:17:{
  if ($did(media.options,17).state == 1 ) { set %media.mpc2 $true }
  if ($did(media.options,17).state == 0 ) { set %media.mpc2 $false }
}
on *:DIALOG:media.options:SCLICK:40:{
  if ($did(media.options,40).state == 1 ) { set %media.vlc1 $true }
  if ($did(media.options,40).state == 0 ) { set %media.vlc1 $false }
}
on *:DIALOG:media.options:SCLICK:41:{
  if ($did(media.options,41).state == 1 ) { set %media.vlc2 $true }
  if ($did(media.options,41).state == 0 ) { set %media.vlc2 $false }
}
on *:DIALOG:media.options:SCLICK:27:{
  if ($did(media.options,27).state == 1 ) { set %media.bsp1 $true }
  if ($did(media.options,27).state == 0 ) { set %media.bsp1 $false }
}
on *:DIALOG:media.options:SCLICK:28:{
  if ($did(media.options,28).state == 1 ) { set %media.bsp2 $true }
  if ($did(media.options,28).state == 0 ) { set %media.bsp2 $false }
}
on *:DIALOG:media.options:SCLICK:29:{
  if ($did(media.options,29).state == 1 ) { set %media.zpl1 $true }
  if ($did(media.options,29).state == 0 ) { set %media.zpl1 $false }
}
on *:DIALOG:media.options:SCLICK:30:{
  if ($did(media.options,30).state == 1 ) { set %media.zpl2 $true }
  if ($did(media.options,30).state == 0 ) { set %media.zpl2 $false }
}
on *:DIALOG:media.options:SCLICK:34:{
  if ($did(media.options,34).state == 1 ) { set %media.areader.file $true }
  if ($did(media.options,34).state == 0 ) { set %media.areader.file $false }
}
on *:DIALOG:media.options:SCLICK:21:{
  if ($did(media.options,21).state == 1 ) { set %media.cdisplay.file $true }
  if ($did(media.options,21).state == 0 ) { set %media.cdisplay.file $false }
}
on *:DIALOG:media.options:SCLICK:22:{
  if ($did(media.options,22).state == 1 ) { set %media.convl $true }
  if ($did(media.options,22).state == 0 ) { set %media.convl $false }
}
on *:DIALOG:media.options:SCLICK:31:{
  if ($did(media.options,31).state == 1 ) { set %media.mpc.regread $true }
  if ($did(media.options,31).state == 0 ) { set %media.mpc.regread $false }
}
on *:DIALOG:media.options:SCLICK:37:{
  if ($did(media.options,37).state == 1 ) { set %media.url.domain $true }
  if ($did(media.options,37).state == 0 ) { set %media.url.domain $false }
}
on *:DIALOG:media.options:SCLICK:42:{
  if ($did(media.options,42).state == 1 ) { set %media.b  }
  if ($did(media.options,42).state == 0 ) { set %media.b  }
}
on *:DIALOG:media.options:SCLICK:11:{ 
  media.defaults
  did -ra media.options 1 %media.winamp
  did -ra media.options 2 %media.mplayer64
  did -ra media.options 13 %media.mplayerc
  did -ra media.options 39 %media.vlcmp
  did -ra media.options 6 %media.pdvd
  did -ra media.options 33 %media.areader
  did -ra media.options 20 %media.cdisplay
  did -ra media.options 26 %media.bsp
  did -ra media.options 25 %media.zoomplay
  did -ra media.options 36 %media.url
  if (%media.w1 == $true) { did -c media.options 14 }
  if (%media.w1 == $false) { did -u media.options 14 }
  if (%media.w2 == $true) { did -c media.options 15 }
  if (%media.w2 == $false) { did -u media.options 15 }
  if (%media.mpc1 == $true) { did -c media.options 16 }
  if (%media.mpc1 == $false) { did -u media.options 16 }
  if (%media.mpc2 == $true) { did -c media.options 17 }
  if (%media.mpc2 == $false) { did -u media.options 17 }
  if (%media.vlc1 == $true) { did -c media.options 40 }
  if (%media.vlc1 == $false) { did -u media.options 40 }
  if (%media.vlc2 == $true) { did -c media.options 41 }
  if (%media.vlc2 == $false) { did -u media.options 41 }
  if (%media.bsp1 == $true) { did -c media.options 27 }
  if (%media.bsp1 == $false) { did -u media.options 27 }
  if (%media.bsp2 == $true) { did -c media.options 28 }
  if (%media.bsp2 == $false) { did -u media.options 28 }
  if (%media.zpl1 == $true) { did -c media.options 29 }
  if (%media.zpl1 == $false) { did -u media.options 29 }
  if (%media.zpl2 == $true) { did -c media.options 30 }
  if (%media.zpl2 == $false) { did -u media.options 30 }
  if (%media.areader.file == $true) { did -c media.options 34 }
  if (%media.areader.file == $false) { did -u media.options 34 }
  if (%media.cdisplay.file == $true) { did -c media.options 21 }
  if (%media.cdisplay.file == $false) { did -u media.options 21 }
  if (%media.convl == $true) { did -c media.options 22 }
  if (%media.convl == $false) { did -u media.options 22 }
  if (%media.mpc.regread == $true) { did -c media.options 31 }
  if (%media.mpc.regread == $false) { did -u media.options 31 }
  if (%media.url.domain == $true) { did -c media.options 37 }
  if (%media.url.domain == $false) { did -u media.options 37 }
  if (%media.b == ) { did -c media.options 42 }
  if (%media.b == $null) { did -u media.options 42 }
}

dialog media.stats {
  title "Media Displayer - PC Stats"
  size -1 -1 181 173
  option dbu
  box "PC Stats", 1, 2 1 95 96
  check "OS", 2, 6 9 20 10
  check "CPU", 4, 6 29 22 10
  check "Uptime", 5, 6 19 27 10
  check "Memory", 6, 6 49 31 10
  check "Network", 7, 50 49 33 10
  check "Screen", 8, 50 29 28 10
  box "Options", 9, 99 53 80 44
  box "Colors and styles", 11, 2 99 177 55
  icon 17, 0 106 94 21,  $scriptdir $+ colors.bmp, 0, noborder
  edit "", 12, 23 128 53 10, autohs
  text "Start", 13, 7 129 15 8
  text "End", 14, 10 141 11 8
  edit "", 15, 23 140 53 10, autohs
  text "Text", 19, 104 129 13 8
  edit "", 20, 118 128 53 10, autohs
  text "Rambar", 21, 97 141 20 8
  edit "", 22, 118 140 53 10, autohs
  button "Ok", 24, 140 158 37 12, ok
  button "Defaults", 25, 101 158 37 12
  check "No Rambar", 27, 102 72 41 10
  text "For help on Control Codes,", 29, 106 107 67 8
  text "click", 30, 106 115 11 8
  link "here", 31, 118 115 12 8
  check "HDD(s)", 16, 50 9 27 10
  check "Graphics Card", 18, 50 19 45 10
  check "Use multi drive HDD display", 23, 102 62 74 10
  check "Display stats locally only", 26, 102 82 71 10
  check "Motherboard", 10, 6 39 42 10
  check "Sound Card", 28, 50 39 40 10
  text "WARNING: Checking more than 6 of the above boxes might result in an incomplete output. This is because of a IRC server limitation to prevent flooding.", 32, 6 60 87 35
  box "Everest", 33, 99 1 80 50
  check "Clocks", 34, 103 9 27 10
  check "Temperatures", 35, 133 9 45 10
  check "Voltages", 36, 103 19 32 10
  check "Fans", 37, 137 19 23 10
  check "Use Fahrenheit", 3, 103 36 48 10
}

on *:DIALOG:media.stats:INIT:0:{
  if (%media.rambar == true) { did -c media.stats 27 }
  if (%media.rambar == false) { did -u media.stats 27 }
  if (%media.msg.os == $true) { did -c media.stats 2 }
  if (%media.msg.os == $false) { did -u media.stats 2 }
  if (%media.msg.uptime == $true) { did -c media.stats 5 }
  if (%media.msg.uptime == $false) { did -u media.stats 5 }
  if (%media.msg.cpu == $true) { did -c media.stats 4 }
  if (%media.msg.cpu == $false) { did -u media.stats 4 }
  if (%media.msg.mobo == $true) { did -c media.stats 10 }
  if (%media.msg.mobo == $false) { did -u media.stats 10 }
  if (%media.msg.sound == $true) { did -c media.stats 28 }
  if (%media.msg.sound == $false) { did -u media.stats 28 }
  if (%media.msg.mem == $true) { did -c media.stats 6 }
  if (%media.msg.mem == $false) { did -u media.stats 6 }
  if (%media.msg.net == $true) { did -c media.stats 7 }
  if (%media.msg.net == $false) { did -u media.stats 7 }
  if (%media.msg.screen == $true) { did -c media.stats 8 }
  if (%media.msg.screen == $false) { did -u media.stats 8 }
  if (%media.msg.hdd == $true) { did -c media.stats 16 }
  if (%media.msg.hdd == $false) { did -u media.stats 16 }
  if (%media.msg.hdd.2 == $true) { did -c media.stats 23 }
  if (%media.msg.hdd.2 == $false) { did -u media.stats 23 }
  if (%media.msg.gfx == $true) { did -c media.stats 18 }
  if (%media.msg.gfx == $false) { did -u media.stats 18 }
  if (%media.ev.c == $true) { did -c media.stats 34 }
  if (%media.ev.c == $false) { did -u media.stats 34 }
  if (%media.ev.t == $true) { did -c media.stats 35 }
  if (%media.ev.t == $false) { did -u media.stats 35 }
  if (%media.ev.v == $true) { did -c media.stats 36 }
  if (%media.ev.v == $false) { did -u media.stats 36 }
  if (%media.ev.f == $true) { did -c media.stats 37 }
  if (%media.ev.f == $false) { did -u media.stats 37 }
  if (%media.ev.c2f == $true) { did -c media.stats 3 }
  if (%media.ev.c2f == $false) { did -u media.stats 3 }
  if (%media.where == echo) { did -c media.stats 26 }
  if (%media.where == msg [ [ $chr(36) $+ ] ] active ) { did -u media.stats 26 }
  did -a media.stats 12 %¨c1
  did -a media.stats 15 %¨c2
  did -a media.stats 20 %¨c3
  did -a media.stats 22 %¨c4
}

on *:DIALOG:media.stats:SCLICK:27:{
  if ($did(media.stats,27).state == 1 ) { set %media.rambar true }
  if ($did(media.stats,27).state == 0 ) { set %media.rambar false }
}
on *:DIALOG:media.stats:SCLICK:2:{
  if ($did(media.stats,2).state == 1 ) { set %media.msg.os $true }
  if ($did(media.stats,2).state == 0 ) { set %media.msg.os $false }
}
on *:DIALOG:media.stats:SCLICK:5:{
  if ($did(media.stats,5).state == 1 ) { set %media.msg.uptime $true }
  if ($did(media.stats,5).state == 0 ) { set %media.msg.uptime $false }
}
on *:DIALOG:media.stats:SCLICK:4:{
  if ($did(media.stats,4).state == 1 ) { set %media.msg.cpu $true }
  if ($did(media.stats,4).state == 0 ) { set %media.msg.cpu $false }
}
on *:DIALOG:media.stats:SCLICK:10:{
  if ($did(media.stats,10).state == 1 ) { set %media.msg.mobo $true }
  if ($did(media.stats,10).state == 0 ) { set %media.msg.mobo $false }
}
on *:DIALOG:media.stats:SCLICK:28:{
  if ($did(media.stats,28).state == 1 ) { set %media.msg.sound $true }
  if ($did(media.stats,28).state == 0 ) { set %media.msg.sound $false }
}
on *:DIALOG:media.stats:SCLICK:6:{
  if ($did(media.stats,6).state == 1 ) { set %media.msg.mem $true }
  if ($did(media.stats,6).state == 0 ) { set %media.msg.mem $false }
}
on *:DIALOG:media.stats:SCLICK:7:{
  if ($did(media.stats,7).state == 1 ) { set %media.msg.net $true }
  if ($did(media.stats,7).state == 0 ) { set %media.msg.net $false }
}
on *:DIALOG:media.stats:SCLICK:8:{
  if ($did(media.stats,8).state == 1 ) { set %media.msg.screen $true }
  if ($did(media.stats,8).state == 0 ) { set %media.msg.screen $false }
}
on *:DIALOG:media.stats:SCLICK:16:{
  if ($did(media.stats,16).state == 1 ) { set %media.msg.hdd $true }
  if ($did(media.stats,16).state == 0 ) { set %media.msg.hdd $false }
}
on *:DIALOG:media.stats:SCLICK:18:{
  if ($did(media.stats,18).state == 1 ) { set %media.msg.gfx $true }
  if ($did(media.stats,18).state == 0 ) { set %media.msg.gfx $false }
}
on *:DIALOG:media.stats:SCLICK:23:{
  if ($did(media.stats,23).state == 1 ) { set %media.msg.hdd.2 $true }
  if ($did(media.stats,23).state == 0 ) { set %media.msg.hdd.2 $false }
}
on *:DIALOG:media.stats:SCLICK:34:{
  if ($did(media.stats,34).state == 1 ) { set %media.ev.c $true }
  if ($did(media.stats,34).state == 0 ) { set %media.ev.c $false }
}
on *:DIALOG:media.stats:SCLICK:35:{
  if ($did(media.stats,35).state == 1 ) { set %media.ev.t $true }
  if ($did(media.stats,35).state == 0 ) { set %media.ev.t $false }
}
on *:DIALOG:media.stats:SCLICK:36:{
  if ($did(media.stats,36).state == 1 ) { set %media.ev.v $true }
  if ($did(media.stats,36).state == 0 ) { set %media.ev.v $false }
}
on *:DIALOG:media.stats:SCLICK:37:{
  if ($did(media.stats,37).state == 1 ) { set %media.ev.f $true }
  if ($did(media.stats,37).state == 0 ) { set %media.ev.f $false }
}
on *:DIALOG:media.stats:SCLICK:3:{
  if ($did(media.stats,3).state == 1 ) { set %media.ev.c2f $true }
  if ($did(media.stats,3).state == 0 ) { set %media.ev.c2f $false }
}
on *:DIALOG:media.stats:SCLICK:26:{
  if ($did(media.stats,26).state == 1 ) { set %media.where echo }
  if ($did(media.stats,26).state == 0 ) { set %media.where msg $chr(36) $+ active }
}
on *:DIALOG:media.stats:EDIT:12:{ .set %¨c1 $did(media.stats,12) }
on *:DIALOG:media.stats:EDIT:15:{ .set %¨c2 $did(media.stats,15) }
on *:DIALOG:media.stats:EDIT:20:{ .set %¨c3 $did(media.stats,20) }
on *:DIALOG:media.stats:EDIT:22:{ .set %¨c4 $did(media.stats,22) }
on *:DIALOG:media.stats:SCLICK:31:{ help Control Codes }
on *:DIALOG:media.stats:SCLICK:25:{ 
  media.stats.defaults
  if (%media.rambar == true) { did -c media.stats 27 }
  if (%media.rambar == false) { did -u media.stats 27 }
  if (%media.msg.os == $true) { did -c media.stats 2 }
  if (%media.msg.os == $false) { did -u media.stats 2 }
  if (%media.msg.uptime == $true) { did -c media.stats 5 }
  if (%media.msg.uptime == $false) { did -u media.stats 5 }
  if (%media.msg.cpu == $true) { did -c media.stats 4 }
  if (%media.msg.cpu == $false) { did -u media.stats 4 }
  if (%media.msg.mobo == $true) { did -c media.stats 10 }
  if (%media.msg.mobo == $false) { did -u media.stats 10 }
  if (%media.msg.sound == $true) { did -c media.stats 28 }
  if (%media.msg.sound == $false) { did -u media.stats 28 }
  if (%media.msg.mem == $true) { did -c media.stats 6 }
  if (%media.msg.mem == $false) { did -u media.stats 6 }
  if (%media.msg.net == $true) { did -c media.stats 7 }
  if (%media.msg.net == $false) { did -u media.stats 7 }
  if (%media.msg.screen == $true) { did -c media.stats 8 }
  if (%media.msg.screen == $false) { did -u media.stats 8 }
  if (%media.msg.hdd == $true) { did -c media.stats 16 }
  if (%media.msg.hdd == $false) { did -u media.stats 16 }
  if (%media.msg.hdd.2 == $true) { did -c media.stats 23 }
  if (%media.msg.hdd.2 == $false) { did -u media.stats 23 }
  if (%media.msg.gfx == $true) { did -c media.stats 18 }
  if (%media.msg.gfx == $false) { did -u media.stats 18 }
  if (%media.ev.c == $true) { did -c media.stats 34 }
  if (%media.ev.c == $false) { did -u media.stats 34 }
  if (%media.ev.t == $true) { did -c media.stats 35 }
  if (%media.ev.t == $false) { did -u media.stats 35 }
  if (%media.ev.v == $true) { did -c media.stats 36 }
  if (%media.ev.v == $false) { did -u media.stats 36 }
  if (%media.ev.f == $true) { did -c media.stats 37 }
  if (%media.ev.f == $false) { did -u media.stats 37 }
  if (%media.ev.c2f == $true) { did -c media.stats 3 }
  if (%media.ev.c2f == $false) { did -u media.stats 3 }
  if (%media.where == echo) { did -c media.stats 26 }
  if (%media.where == msg [ [ $chr(36) $+ ] ] active ) { did -u media.stats 26 }
  did -ra media.stats 12 %¨c1
  did -ra media.stats 15 %¨c2
  did -ra media.stats 20 %¨c3
  did -ra media.stats 22 %¨c4
}

dialog media.vlc {
  title "Media Displayer - VLC Extra interfaces options"
  size -1 -1 199 186
  option dbu
  button "Ok", 24, 157 171 37 12, ok
  button "Defaults", 25, 118 171 37 12
  box "", 1, 3 1 193 164
  edit "", 2, 52 97 114 10
  edit "", 4, 52 51 114 10
  text "Host address:", 5, 7 52 35 8
  text "Source directory:", 6, 7 98 43 8
  text "WARNING: Fucking up these settings will cause /vlc not to function properly. You ONLY need to change things in here when you're using the extra interfaces in VLC for other things.", 8, 16 14 166 21
  box "", 9, 12 8 173 29
  button "Browse", 3, 168 97 24 9
  text "Extra interfaces:", 7, 7 129 43 8
  edit "", 10, 52 128 114 10
  text "Default: 127.0.0.1:8082", 11, 53 62 59 8
  text "Using the default IP:Port means the http-interface will only be accessible locally. If you want it accessible over the internet, you have to change it here.", 12, 53 70 136 21
  text "Default: Your VLC dir\http\", 13, 53 108 65 7
  text "Example: C:\Program Files\VideoLAN\VLC\http\", 14, 53 115 114 8
  text "Default: http", 15, 53 139 34 8
  text "If you want to use more extra interfaces than http you have to set them here. Example: http:rc:wxwidgets:skins", 17, 53 147 139 15
}

on *:DIALOG:media.vlc:INIT:0:{
  if (%media.vlc.dir == $null) { did -ra media.vlc 2 No dir set! }
  if (%media.vlc.dir != $null) { did -ra media.vlc 2 %media.vlc.dir }
  did -ra media.vlc 4 %media.vlc.host
  did -ra media.vlc 10 %media.vlc.ei
}
on *:DIALOG:media.vlc:EDIT:4:{ .set %media.vlc.host $did(media.vlc,4) }
on *:DIALOG:media.vlc:EDIT:2:{ .set %media.vlc.dir $did(media.vlc,2) }
on *:DIALOG:media.vlc:EDIT:10:{ .set %media.vlc.ei $did(media.vlc,10) }
on *:DIALOG:media.vlc:SCLICK:3:{ 
  .set %media.vlc.dir $sdir="Select Source directory" C:\
  if (%media.vlc.dir == $null) { did -ra media.vlc 2 No dir set! }
  if (%media.vlc.dir != $null) { did -ra media.vlc 2 %media.vlc.dir }
}
on *:DIALOG:media.vlc:SCLICK:24:{ vlc -e }
on *:DIALOG:media.vlc:SCLICK:25:{ 
  media.vlc.defaults
  if (%media.vlc.dir == $null) { did -ra media.vlc 2 No dir set! }
  if (%media.vlc.dir != $null) { did -ra media.vlc 2 %media.vlc.dir }
  did -ra media.vlc 4 %media.vlc.host
  did -ra media.vlc 10 %media.vlc.ei
}

; You really went down here? ^^
; EOF