|
|
Joined: Oct 2003
Posts: 80
Babel fish
|
OP
Babel fish
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
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Oct 2003
Posts: 80
Babel fish
|
OP
Babel fish
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
|
|
|
|
Joined: Nov 2003
Posts: 228
Fjord artisan
|
Fjord artisan
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
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
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
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
|
|
|
|
Joined: Oct 2003
Posts: 80
Babel fish
|
OP
Babel fish
Joined: Oct 2003
Posts: 80 |
Jason yes that exactly what the range looks like
RockHound
|
|
|
|
Joined: Oct 2003
Posts: 80
Babel fish
|
OP
Babel fish
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
|
|
|
|
Joined: Oct 2003
Posts: 80
Babel fish
|
OP
Babel fish
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
|
|
|
|
Joined: Nov 2003
Posts: 228
Fjord artisan
|
Fjord artisan
Joined: Nov 2003
Posts: 228 |
/did -c $dname id $vol(master) - works
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)
}
|
|
|
|
Joined: Oct 2003
Posts: 80
Babel fish
|
OP
Babel fish
Joined: Oct 2003
Posts: 80 |
yes that worked just fine thanks jason
RockHound
|
|
|
|
|
|