forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


trackbar & volume

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Fri Apr 20, 2007 2:09 pm    Post subject: trackbar & volume Reply with quote

Using vdsmedia.dll

MEDIA VOLUME, <control name>,<level>

Set the volume to the desired level. (Zero specifies full volume and –10,000 specifies no volume).

I want to use a horizontial trackbar for this any ideas on how to calutlate this since the trackbar is 0 - 100 (full)

Nathan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Fri Apr 20, 2007 3:11 pm    Post subject: Reply with quote

What about something like this?

Code:
%%trackbar = @dlgtext(trackbar1)

if @equal(%%trackbar,100)
  %%level = 0
elsif @greater(%%trackbar,90)
  %%level = -1000
elsif @greater(%%trackbar,80)
  %%level = -2000
elsif @greater(%%trackbar,70)
  %%level = -3000
elsif @greater(%%trackbar,60)
  %%level = -4000
elsif @greater(%%trackbar,50)
  %%level = -5000
elsif @greater(%%trackbar,40)
  %%level = -6000
elsif @greater(%%trackbar,30)
  %%level = -7000
elsif @greater(%%trackbar,20)
  %%level = -8000
elsif @greater(%%trackbar,10)
  %%level = -9000
else
  %%level = -10000
end

MEDIA VOLUME, <control name>,%%level

_________________
cheers

Dave
Back to top
View user's profile Send private message
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Fri Apr 20, 2007 4:55 pm    Post subject: Reply with quote

Hi Rubes & Dave Very Happy

Ttry this code:

Code:
%%trackbar = @dlgtext(trackbar1)
%%level = @sum(-@diff(100,%%tracker)00,0)


Good luck Wink
____________

uVeDeSe
____________
Back to top
View user's profile Send private message Visit poster's website
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Sun Apr 22, 2007 1:48 am    Post subject: Reply with quote

Very clever, uVeDeSe... even though there is a typo (trackbar / tracker) Wink
_________________
cheers

Dave
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group