mIRC Home    About    Download    Register    News    Help

Page 1 of 2 1 2 >
Topic Options
#24768 - 18/05/03 01:42 AM scrollbar
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
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

Top
#24769 - 18/05/03 02:04 AM Re: scrollbar
neophyte Offline
Fjord artisan

Registered: 12/04/03
Posts: 426
Loc: Australia
_________________________
--------
mIRC - fun for all the family (except grandma and grandpa)

Top
#24770 - 18/05/03 02:08 AM Re: scrollbar
Nimue Offline
Hoopy frood

Registered: 08/12/02
Posts: 699
Loc: Sunshine, Oz.
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".

Top
#24771 - 18/05/03 02:19 AM Re: scrollbar
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
thanx so much grin
_________________________
new username: tidy_trax

Top
#24772 - 18/05/03 02:32 AM Re: scrollbar
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
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

Top
#24773 - 18/05/03 02:36 AM Re: scrollbar
Nimue Offline
Hoopy frood

Registered: 08/12/02
Posts: 699
Loc: Sunshine, Oz.
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.

Top
#24774 - 18/05/03 02:41 AM Re: scrollbar
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
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

Top
#24775 - 18/05/03 02:49 AM Re: scrollbar
ScatMan Offline
Hoopy frood

Registered: 06/05/03
Posts: 730
use:
.timerpos 0 1 did -c mp3 42 $!inmp3.pos
that will update the identifier in the timer

Top
#24776 - 18/05/03 02:53 AM Re: scrollbar
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
now it says this every second frown
* /did: invalid parameters
* /did: invalid parameters
_________________________
new username: tidy_trax

Top
#24777 - 18/05/03 02:58 AM Re: scrollbar
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
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

Top
#24778 - 18/05/03 02:59 AM Re: scrollbar
Nimue Offline
Hoopy frood

Registered: 08/12/02
Posts: 699
Loc: Sunshine, Oz.
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

Top
#24779 - 18/05/03 03:01 AM Re: scrollbar
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
ok thanx smile
_________________________
new username: tidy_trax

Top
#24780 - 18/05/03 03:04 AM Re: scrollbar
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
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

Top
#24781 - 18/05/03 03:22 AM Re: scrollbar
Nimue Offline
Hoopy frood

Registered: 08/12/02
Posts: 699
Loc: Sunshine, Oz.
I just told you how...
In your 'splay' event/alias/action/whatever, put /did -z mp3 42 0 $insong.length

Top
#24782 - 18/05/03 03:25 AM Re: scrollbar
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
o ok thanx grin
_________________________
new username: tidy_trax

Top
#24783 - 18/05/03 04:15 AM Re: scrollbar
KingTomato Offline
Planetary brain

Registered: 04/01/03
Posts: 3012
Loc: New Hampshire, USA
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

Top
#24784 - 18/05/03 02:07 PM Re: scrollbar
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
i got the idea from cyphers mp3 actually smile
_________________________
new username: tidy_trax

Top
#24785 - 18/05/03 02:07 PM Re: scrollbar
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
that doesnt work as did -z is for resetting listbox scrollbars
not seperate scrollbars
_________________________
new username: tidy_trax

Top
#24786 - 18/05/03 04:27 PM Re: scrollbar
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
any other ideas gr8ly appreciated grin
_________________________
new username: tidy_trax

Top
#24787 - 18/05/03 04:51 PM Re: scrollbar
Collective Offline
Planetary brain

Registered: 10/12/02
Posts: 3138
Loc: London, UK
-z does work, for me anyway.

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

Top
Page 1 of 2 1 2 >