mIRC Home    About    Download    Register    News    Help

Print Thread
#29762 14/06/03 02:13 PM
Joined: Jan 2003
Posts: 148
K
Knappen Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
How do I change the volume of the song with the use of a trackbar (from mdx.dll)?

KingTomato, do you know?

smile

#29763 14/06/03 03:12 PM
Joined: Mar 2003
Posts: 272
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Mar 2003
Posts: 272
Code:
dialog track {
  size -1 -1 104 100
  title "Blah?"
  list 1,30 0 23 101,size
}

On 1:DIALOG:track:INIT:1:{
  dll mdx.dll SetMircVersion $version
  dll mdx.dll MarkDialog $dname mdx SetControlMDX $dname 1 TrackBar vertical autoticks both > bars.mdx
  dll mdx.dll SetBorderStyle $dname 1 windowedge
  did -i $dname 1 1 params $calc(65535 - $vol(master)) 0 65535 1000 10000 65535 0 18
  did -i $dname 1 1 tickfreq 1
}
On 1:DIALOG:track:SCLICK:1:{
  tokenize 32 $did($dname,1,1)
  /vol -v $calc(65535 - $1)
}


- cF
Dedicated helper for rent.
#29764 14/06/03 04:04 PM
Joined: Jan 2003
Posts: 148
K
Knappen Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
Ok, it works! but how do i get it to return % of the volume?

#29765 14/06/03 04:21 PM
Joined: Mar 2003
Posts: 272
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Mar 2003
Posts: 272
After you played with that trackbar, it will set your master volume to the level you specified, so you can use $vol(master) to return the volume level you set.


- cF
Dedicated helper for rent.
#29766 14/06/03 04:30 PM
Joined: Jan 2003
Posts: 148
K
Knappen Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
ok... I have this code now:

tokenize 32 $did(37,1)
vol -p $calc(65535 - $1)
did -ra $dname 36 $int($calc(($1 / 65535) * 100)) $+ %

It works but it returns the % backwards... Like when i have max vol it says 0% and when i have vol = 0 It says 100%. How do i fix this?

#29767 14/06/03 05:02 PM
Joined: Jan 2003
Posts: 148
K
Knappen Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
Never mind! I figured it out my self using this code:

$remove($calc($int($calc(($1 / 65535) * 100)) - 100),-) $+ %

Now it returns the % the right way smile

Thanks for your help anyway!

smile


Link Copied to Clipboard