Home AMX User Forum NetLinx Studio

how can i get the value of slider in commandfusion software by amx

Hi everyone
Does anyone use iphone to control some devices through amx ? i can control tv's "power on/off"、?channel up/down? very well.But now I want to control tv's volume,so i create a "Slider Tool" in commandfusion software and set the Analog join is 1,I think i can use it like "bargraph" in TPDesign4 ,so i write a segment of level_event program
     DEFINE_VARIABLE                          
     interger volume_level=0                     
                                                                                                                    
     level_event[vdvTP_1__1, 1]            
     {                                                    
       volume_level=level.value                
      }                                               
when i moved the Slider ,i think "volume_level" will be changed by
level.value ,but it is 0 from beginning to end
i don't know why,I want to know how can i get the value of "Slider" when i release.can anybody help me?

thanks a lot in advance

Comments

  • DHawthorneDHawthorne Posts: 4,584
    You can't query a level directly (that I know of anyway, but even if you can, this is better), but using the CREATE_LEVEL function in startup can link it to a variable, so the variable will automatically update when the level changes. Note it's only one way - changing the variable doesn't change the level; you still need SEND_LEVEL for that. But the variable will track the level value very nicely.
Sign In or Register to comment.