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:)
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".
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:)
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.
that didnt seem to work
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
use:
.timerpos 0 1 did -c mp3 42 $!inmp3.pos
that will update the identifier in the timer
now it says this every second
* /did: invalid parameters
* /did: invalid parameters
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
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
now i still have 1 more problem
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
I just told you how...
In your 'splay' event/alias/action/whatever, put /did -z mp3 42 0 $insong.length
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
i got the idea from cyphers mp3 actually
that doesnt work as did -z is for resetting listbox scrollbars
not seperate scrollbars
any other ideas gr8ly appreciated
-z does work, for me anyway.
Type /did -z mp3 42 0 2 and then try scrolling with the arrow buttons.
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
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
actually it does work thankyou to everyone but especially you and nimue
i thought that did -z would actually change the range in the dialog table
cheers