mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#24768 18/05/03 12:42 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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:)


new username: tidy_trax
#24769 18/05/03 01:04 AM
Joined: Apr 2003
Posts: 426
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426


--------
mIRC - fun for all the family (except grandma and grandpa)
#24770 18/05/03 01:08 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
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".

#24771 18/05/03 01:19 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
thanx so much grin


new username: tidy_trax
#24772 18/05/03 01:32 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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:)


new username: tidy_trax
#24773 18/05/03 01:36 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
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.

#24774 18/05/03 01:41 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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


new username: tidy_trax
#24775 18/05/03 01:49 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
use:
.timerpos 0 1 did -c mp3 42 $!inmp3.pos
that will update the identifier in the timer

#24776 18/05/03 01:53 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
now it says this every second frown
* /did: invalid parameters
* /did: invalid parameters


new username: tidy_trax
#24777 18/05/03 01:58 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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
















new username: tidy_trax
#24778 18/05/03 01:59 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
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

#24779 18/05/03 02:01 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
ok thanx smile


new username: tidy_trax
#24780 18/05/03 02:04 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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


new username: tidy_trax
#24781 18/05/03 02:22 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
I just told you how...
In your 'splay' event/alias/action/whatever, put /did -z mp3 42 0 $insong.length

#24782 18/05/03 02:25 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
o ok thanx grin


new username: tidy_trax
#24783 18/05/03 03:15 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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


-KingTomato
#24784 18/05/03 01:07 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
i got the idea from cyphers mp3 actually smile


new username: tidy_trax
#24785 18/05/03 01:07 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
that doesnt work as did -z is for resetting listbox scrollbars
not seperate scrollbars


new username: tidy_trax
#24786 18/05/03 03:27 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
any other ideas gr8ly appreciated grin


new username: tidy_trax
#24787 18/05/03 03:51 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
-z does work, for me anyway.

Type /did -z mp3 42 0 2 and then try scrolling with the arrow buttons.

Page 1 of 2 1 2

Link Copied to Clipboard