mIRC Homepage
Posted By: pheonix scrollbar - 18/05/03 12:42 AM
i was wondering if anyone can give me an example or a link to a tutorial on how to script a scrollbar in a mirc dialog mp3 player to move along as the song is being played.
many thanx in advance:)
Posted By: neophyte Re: scrollbar - 18/05/03 01:04 AM
www.mircscripts.org
Posted By: Nimue Re: scrollbar - 18/05/03 01:08 AM
It depends on the range you have set for the scrollbar. Assuming you set the scroll range to "0 <$insong.length>", use "did -c Dialog ID $insong.pos".
Posted By: pheonix Re: scrollbar - 18/05/03 01:19 AM
thanx so much grin
Posted By: pheonix Re: scrollbar - 18/05/03 01:32 AM
1 more thing please.
if i was to use a
.timer 0 1 did -c mp3 45 $inmp3.pos
how do i halt the timer once the mp3 finishes using the
on *:MP3END:{ command?
thanx:)
Posted By: Nimue Re: scrollbar - 18/05/03 01:36 AM
Well you should use
.timernamedtimersareeasiertoidentify 0 1 did -c mp3 45 $!insong.pos

and turn it off by .timernamedtimersareeasiertoidentify off


The $inmp3 and $mp3() are deprecated, you should use the new $insong and $sound() identifiers, because sooner or later the old $*mp3* identifiers will be removed.

$sound(filename|type)
Returns information about the specified file if a filename
was specified, or the associated folder for a filename or
file type, where type can be wave, midi, mp3, wma, ogg.

When used with an mp3 files it supports the same properties
as $mp3().

Note: this replaces $wavedir, $mididir, $mp3dir, and $mp3().
These are still supported for now but no longer documented.

$insong
Returns information about the mp3, wma, or ogg file that
is being played, same properties as $inmp3.

Note: this replaces $inmp3, which is still supported for
now
but no longer documented.
Posted By: pheonix Re: scrollbar - 18/05/03 01:41 AM
that didnt seem to work frown
here are the controls asssosciated with the scrollbar
(i didnt think you would need to see the on dialog events)


scroll "", 42, 1 173 308 9, range 0 horizontal
on *:MP3END:{
.timerpos off
}
.timerpos 0 1 did -c mp3 42 $inmp3.pos
Posted By: ScatMan Re: scrollbar - 18/05/03 01:49 AM
use:
.timerpos 0 1 did -c mp3 42 $!inmp3.pos
that will update the identifier in the timer
Posted By: pheonix Re: scrollbar - 18/05/03 01:53 AM
now it says this every second frown
* /did: invalid parameters
* /did: invalid parameters
Posted By: pheonix Re: scrollbar - 18/05/03 01:58 AM
this time i managed to get it to scroll using range 1000
but because the mp3 pos is 100000 + is goes stright to the end
so does anyone know how to set the range of the scrollbar to either an alias or a variable of the mp3's length?
thanx for the help so far smile














Posted By: Nimue Re: scrollbar - 18/05/03 01:59 AM
From mirc.hlp
scroll "text", id, x y w h, style (top left bottom right horizontal range N N)

Note the N N, it is a range, e.g 0 65535

Iin your 'splay' event/alias/action/whatever, put /did -z mp3 42 0 $insong.length
Posted By: pheonix Re: scrollbar - 18/05/03 02:01 AM
ok thanx smile
Posted By: pheonix Re: scrollbar - 18/05/03 02:04 AM
now i still have 1 more problem blush
i have to set the range on the scrollbar so that its 0 to "length of mp3" but i cant seem to get this right frown
Posted By: Nimue Re: scrollbar - 18/05/03 02:22 AM
I just told you how...
In your 'splay' event/alias/action/whatever, put /did -z mp3 42 0 $insong.length
Posted By: pheonix Re: scrollbar - 18/05/03 02:25 AM
o ok thanx grin
Posted By: KingTomato Re: scrollbar - 18/05/03 03:15 AM
Gee, wonder where he got the idea of using a scrollbar--couldn't have been the show and tell we had with various mp3 players >:D
Posted By: pheonix Re: scrollbar - 18/05/03 01:07 PM
i got the idea from cyphers mp3 actually smile
Posted By: pheonix Re: scrollbar - 18/05/03 01:07 PM
that doesnt work as did -z is for resetting listbox scrollbars
not seperate scrollbars
Posted By: pheonix Re: scrollbar - 18/05/03 03:27 PM
any other ideas gr8ly appreciated grin
Posted By: Collective Re: scrollbar - 18/05/03 03:51 PM
-z does work, for me anyway.

Type /did -z mp3 42 0 2 and then try scrolling with the arrow buttons.
Posted By: pheonix Re: scrollbar - 18/05/03 03:52 PM
heres a screenshot to show you exactly what i mean



that scrollbar underneath the listbox is what i want to scroll across while the mp3 is being played but i cant seem to set the range to the $insong.length of the mp3 being played frown
Posted By: pheonix Re: scrollbar - 18/05/03 03:53 PM
in mirc help it says did -z is for resetting the size of a listbox scrollbar e.g for when using a find a friend .
but as you can see my scrollbar isn't attached to anything
Posted By: pheonix Re: scrollbar - 18/05/03 04:01 PM
actually it does work thankyou to everyone but especially you and nimue grin
i thought that did -z would actually change the range in the dialog table blush
cheers smile
© mIRC Discussion Forums