Home AMX User Forum NetLinx Studio
Options

How can I get Text Value from a button on TP?

How can I get Text Value from a button on TP? I have a button with a text inserted by the user by a numeric keyboard. How can I read the value?
Thanks
Alex

Comments

  • Options
    viningvining Posts: 4,368
    Have you tried this?
    "'?TXT-<vt addr range>,<button states range>'"
    
          Get the current text information. 
    
     
    
          Syntax: 
    
                SEND_COMMAND <DEV>,"'?TXT-<vt addr range>,<button states range>,<optional index>'"
    
     
    
          Variables: 
    
                variable text address range = 1 - 4000.
    
                button states range = 1 - 256 for multi-state buttons 
    
                  (0 = All states, for General buttons 1 = Off state and 2 = On state).   
    
                optional index = This is used if a string was too long to get back in one 
    
                  command. The reply will start at this index.    
    
                custom event type = 1001:
    
     
    
                      Flag   - Zero
    
                      Value1 - Button state number
    
                      Value2 - Actual length of string 
    
                      Value3 - Index
    
                      Text   - Text from the button 
    
                      Text length - Button text length
    
     
    
     
    
          Example:
    
                SEND COMMAND Panel,"'?TXT-529,1'"
    
                Gets the button 'OFF state' text information.
    
                The result sent to the Master would be:
    
                      ButtonGet Id = 529 Type = 1001
    
                      Flag   = 0
    
                      VALUE1 = 1
    
                      VALUE2 = 14
    
                      VALUE3 = 1
    
                      TEXT   = This is a test
    
                      TEXT LENGTH = 14
    
    
Sign In or Register to comment.