|
Joined: May 2003
Posts: 2,250
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,250 |
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:)
|
|
|
|
Joined: Apr 2003
Posts: 426
Fjord artisan
|
Fjord artisan
Joined: Apr 2003
Posts: 426 |
|
|
|
|
Joined: Dec 2002
Posts: 698
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 698 |
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".
|
|
|
|
Joined: May 2003
Posts: 2,250
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,250 |
thanx so much
|
|
|
|
Joined: May 2003
Posts: 2,250
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,250 |
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:)
|
|
|
|
Joined: Dec 2002
Posts: 698
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 698 |
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.
|
|
|
|
Joined: May 2003
Posts: 2,250
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,250 |
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
|
|
|
|
Joined: May 2003
Posts: 730
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 730 |
use: .timerpos 0 1 did -c mp3 42 $!inmp3.pos that will update the identifier in the timer
|
|
|
|
Joined: May 2003
Posts: 2,250
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,250 |
now it says this every second  * /did: invalid parameters * /did: invalid parameters
|
|
|
|
Joined: May 2003
Posts: 2,250
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,250 |
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
|
|
|
|
Joined: Dec 2002
Posts: 698
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 698 |
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
|
|
|
|
Joined: May 2003
Posts: 2,250
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,250 |
ok thanx
|
|
|
|
Joined: May 2003
Posts: 2,250
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,250 |
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
|
|
|
|
Joined: Dec 2002
Posts: 698
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 698 |
I just told you how... In your 'splay' event/alias/action/whatever, put /did -z mp3 42 0 $insong.length
|
|
|
|
Joined: May 2003
Posts: 2,250
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,250 |
o ok thanx
|
|
|
|
Joined: Jan 2003
Posts: 2,973
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,973 |
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
|
|
|
|
Joined: May 2003
Posts: 2,250
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,250 |
i got the idea from cyphers mp3 actually
|
|
|
|
Joined: May 2003
Posts: 2,250
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,250 |
that doesnt work as did -z is for resetting listbox scrollbars not seperate scrollbars
|
|
|
|
Joined: May 2003
Posts: 2,250
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,250 |
any other ideas gr8ly appreciated
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
-z does work, for me anyway.
Type /did -z mp3 42 0 2 and then try scrolling with the arrow buttons.
|
|
|
|
|