Home AMX User Forum AMX General Discussion

TP Programming command for button name.

Hey anyone know if there is a programming command to change the name of a button on a touch panel, for example I have a _Keyboard page the data input buttons' name is KEYB- I'd like to set the name of this button each time I call the _Keyboard page. This way I can have one _Keyboard page that sends out different prefix's on the strings received in data.text.

Cheers.

Comments

  • ericmedleyericmedley Posts: 4,177
    syslock wrote: »
    Hey anyone know if there is a programming command to change the name of a button on a touch panel, for example I have a _Keyboard page the data input buttons' name is KEYB- I'd like to set the name of this button each time I call the _Keyboard page. This way I can have one _Keyboard page that sends out different prefix's on the strings received in data.text.

    Cheers.

    Is this the built-in keyborad? Do you call it by sending the Keyboard command?

    If so, you're probably seeing the text coming back from the TP as a text string.

    KEYB-R or whatever.

    What you could do is use the button the client uses to open the keyboard to set a flag and track the mode that way.

    something along the lines of..

    button 101 opens the keyboard for entering address
    button 102 opens the keyboard for entering TV Channel Preset Name
    button 103 opens keyboard for entering favorite pet names.

    etc..

    then in the program. (in a very simplified form)
    button_event[dv_tp_1,101]
    button_event[dv_tp_1,102]
    button_event[dv_tp_1,103]
    button_event[dv_tp_1,104]
    {
    push:
      {
      keyboard_mode=button.input.channel
      }
    }
    
    data_evetn[dv_tp_1]
    {
    string:
      {
      if(find_string(data.text,'KEYB-',1))
        { 
        switch(keyboard_mode)
          {
          case 101:// address
            {
            //concantinate for address
            }
          case 102:// TV Preset
            {
            //concantinate for TV Preset name
            }
          case 103:// Pet Name
            {
            //concantinate for Pet Name
            }
          }
        }
      }
    }
    


    I would do a button array for this and also add some 'zero index' traps and whatnot but this is the general idea.
  • Thanks.

    That is pretty much what I've done just wondering about the command though.
  • ericmedleyericmedley Posts: 4,177
    syslock wrote: »
    That is pretty much what I've done just wondering about the command though.

    Well, if you're using the built-in keyboard/keypad you're not going to be able to change it.. It's more a function of the TP rather than a function of the button. (I think I understand what your asking...)
  • Joe HebertJoe Hebert Posts: 2,159
    syslock wrote: »
    Hey anyone know if there is a programming command to change the name of a button on a touch panel, for example I have a _Keyboard page the data input buttons' name is KEYB- I'd like to set the name of this button each time I call the _Keyboard page. This way I can have one _Keyboard page that sends out different prefix's on the strings received in data.text.
    Good idea, however, I don't know of any way to change the Name property of any button let alone a button that has an address code of 0. There is no way to reach it via code.
  • I made a copy of the system __keyboard and renamed it _keyboard this way you can customize the look to suit your design and still use the "'@AKB-&lt;initial text>;<prompt text>'" to call the up the keyboard.

    Is there a thread were we can post feature requests?
  • Joe HebertJoe Hebert Posts: 2,159
    syslock wrote: »
    Is there a thread were we can post feature requests?
    Here?s one that AMX Engineering started:

    Feedback on AMX tools
    http://amxforums.com/showthread.php?t=6247
Sign In or Register to comment.