4 Replies Latest reply on Jun 6, 2007 8:51 PM by wgb14

    A volume controler

    wgb14 Level 1
      Hi all,

      Thsi question is beyond my programming skills but perhaps someone may know the answer. I am looking for a way to create a volume controler that will control the volume of windows and it will be in this format:

      - 10 + --Number 10 is an arbotary number of the volume at the particulat time instance. I want to allow my user to increase and decrease the volume by clicking on the plus/minors buttons (from a range of 0 = no volume to 100 = maximum volume)

      Any ideas?
        • 1. Re: A volume controler
          Level 7
          Check Buddy API - it has baGetVolume() and baSetVolume() functions that
          can act on the "master" volume which is what I think you're after.
          • 2. Re: A volume controler
            wgb14 Level 1

            thanks for your reply sean!Although, i am aware of the BudAPI, i don't really know how to decrease/increase the value of baGetVolume and set the volume appropriately. Do you have a more specific script in mind?
            • 3. Re: A volume controler
              Level 7
              baGetVolume("master") will tell you what it's currently set at and
              baSetVolume("master", integerValue) will set it.
              For example:
              -- volume control buttons
              property myDirection

              on getPropertyDescriptionList
              return [#myDirection: [#comment: "Alter volume up/down:", #format:
              #symbol, #default: #up, #range: [#up, #down]]]

              on mouseUp me
              tVolume = baGetVolume("master")
              case myDirection of
              newVolume = min((tVolume + 10), 100)
              newVolume = max((tVolume - 10), 0)
              end case
              if ( newVolume <> tVolume ) then OK = baSetVolume("master", newVolume)
              • 4. Re: A volume controler
                wgb14 Level 1
                It is working perfecly, Again many many thanks