MP3 Player Scroll/Seek Scrollbar

By nT0xIc8 on Sep 30, 2003

Adds a scrollbar for your mp3 player that users can use to see position as well as seek back/forth in the song.


1-) You will need to make (in your dialog) your horizontal scrollbar with a range of 100.

2-) whatever alias you use to play your mp3's with, add the alias 'pos.seek' to the end of it.

3-) And finally, the code: Here it is.


I hope it works for everyone! worked fine for me and tested on mIRC v6.03 and used in my mp3 script for several months now during development.

Any questions feel free to send me a PM.

; Alias for  Position/Seek Scroll Bar (checking where in the mp3 you are, moving back/forward) 
alias -l pos.seek { 
  if ($dialog(dialog_name_here) != $null) && ($inmp3 == $true) { 
    did -c dialog_name_here ID $round($calc($calc($insong.pos / $insong.length) * 100),0) 
  } 
  elseif ($dialog(dialog_name_here) == $null) { 
    .timer.pos.seek off 
  } 
} 

; Add this to your on dialog events. This looks to see if the scroll 
; bar has been manually changed. Replace 'dialog_name_here' & 'ID'. 
on *:dialog:dialog_name_here:scroll:ID: { 
  if ($devent == scroll) { 
    if ($did == ID) { 
      if ($inmp3 == $true) { 
        var %t = $round($calc($did(dialog_name_here,ID).sel / 22000 * $inmp3.length),0) 
        .splay seek  $calc((%t + $did(dialog_name_here,ID).sel) * 200) 
      } 
    } 
  } 
} 

Comments

Sign in to comment.
relmyclone   -  Jan 04, 2004

hey ntoxic.im sorta confused with all that stuff.you think you could aim me? aim is relm da annoying .and explain it to me a little.if im stupid then...i am stupid X_X.anyone else aim me and DIE!!!

 Respond  
nT0xIc8   -  Sep 30, 2003

Questions?Comments?Tired of that old car?Have money I can borrow? Post it here!

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.