mIRC Home    About    Download    Register    News    Help

Print Thread
#63544 10/12/03 06:27 AM
Joined: Oct 2003
Posts: 80
R
Babel fish
OP Offline
Babel fish
R
Joined: Oct 2003
Posts: 80
Im working on a mp3 player that uses a scrollbar for volume. It works fine but i cannot find a way to set the scrollbar to the position that the master volume is at when i open the dialog. i was planning to use a (did) but none of the flags seem to work.

any help would be welcome


RockHound
#63545 10/12/03 06:32 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Be more specific, what did you try. mIRC can get the volume level of a sound that's playing internally, so there should be no trouble doing this.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#63546 10/12/03 06:45 AM
Joined: Oct 2003
Posts: 80
R
Babel fish
OP Offline
Babel fish
R
Joined: Oct 2003
Posts: 80
K below is the volume adjustment that works fine
-------------------------------------------------
on *:dialog:mp3:scroll:*: {
if ($did = 30) { vol -v $did(mp3,30).sel }
}
------------------------------------------------

This is part im having problems, as an example of what i have been trying is below
-------------------------------------------------
on *:dialog:mp3:init:*: {
did -o mp3 30 $vol(master)
}
-----------------------------------------------

what im trying to do is have the scroll position set to the master volume when the dialog is opened. currently when i open the dialog the scrollbar is set at 0. when it should be set at about 20000.


RockHound
#63547 10/12/03 10:12 AM
Joined: Nov 2003
Posts: 228
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
Are you setting the range for the scrollbar in the dialog table?

For example:
scroll "", 1, 1 2 100 10, horizontal range 0 65535

#63548 10/12/03 02:29 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Try playing a soundfile and then manually type //echo -a $vol(master) - does that return anything? If not I'm gonna have to start experimenting a bit myself smile


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#63549 10/12/03 06:39 PM
Joined: Oct 2003
Posts: 80
R
Babel fish
OP Offline
Babel fish
R
Joined: Oct 2003
Posts: 80
Jason yes that exactly what the range looks like


RockHound
#63550 10/12/03 06:58 PM
Joined: Oct 2003
Posts: 80
R
Babel fish
OP Offline
Babel fish
R
Joined: Oct 2003
Posts: 80
i did the "//echo -a $vol(master)" in both init and scroll and it returned "42087" i also just typed it in. worked as well but calling this from the inti so it will set scrollbar to the correct level in the raqnge of 0 - 65535.

on *:dialog:mp3:init:*: {
did -z mp3 $vol(master) - does not work
did -i mp3 $vol(master) - does not work
did -o mp3 $vol(master) - does not work
did -ra mp3 $vol(master) - does not work
etc
}

the bar always seem to be set at 0 when the dialog is open. I do not think there is away that it came be done.


RockHound
#63551 10/12/03 08:05 PM
Joined: Oct 2003
Posts: 80
R
Babel fish
OP Offline
Babel fish
R
Joined: Oct 2003
Posts: 80
Im not sure anyone really understands what im trying to get at here but im gonna try put it this way. im trying to move the scroller bar position using a command. specifically a (did) command. hope this helps.


RockHound
#63552 10/12/03 08:27 PM
Joined: Nov 2003
Posts: 228
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
/did -c $dname id $vol(master) - works

Code:
dialog VolTest {
  option dbu
  size -1 -1 100 100
  scroll "", 1, 1 2 98 20, horizontal, range 0 65535
}
on *:DIALOG:VolTest:init:0: {
  did -c $dname 1 $vol(master)
}

#63553 10/12/03 08:58 PM
Joined: Oct 2003
Posts: 80
R
Babel fish
OP Offline
Babel fish
R
Joined: Oct 2003
Posts: 80
yes that worked just fine thanks jason


RockHound

Link Copied to Clipboard