Home AMX User Forum NetLinx Studio

variable text string

i'm trying to get the numbers on a keypad to display in a variable text button (for a audio conference system...to see the number as it is being dialed).

the touch panel is a VPN-CP.
i could create a keypad button, but that pops open a keypad and closes it after pushing "enter", which i don't want to do. it also does not have the star and pound symbol, which may or may not be needed.
so, i created my own keypad, sending the numbers to the Vortex EF2211.

how do i create a string, add the next character entered, have the full number displayed (as number buttons are being pushed)?

thanks.

Comments

  • HedbergHedberg Posts: 671
    This should give you an idea of how it can be done.
    BUTTON_EVENT[vdvAllVortexTP,nPhoneNbrBtn]
    {
    	PUSH:
    	{
    		local_var INTEGER nBtnIdx
    		nBtnIdx = GET_LAST(nPhoneNbrBtn)
    		IF(!flagPhoneStatus) //CHECK TO SEE IF THE PHONE IS ON HOOK
    		{
    			IF(nBtnIdx = 12)
    			{
    				sNumberToDial = "sNumberToDial,35"
    			}
    			ELSE IF(nBtnIdx = 11)
    			{
    				sNumberToDial = "sNumberToDial,42"
    			}
    			ELSE
    			{
    				sNumberToDial = "sNumberToDial,ITOA(nBtnIdx-1)"
    			}
    		}
    		ELSE IF (flagPhoneStatus)
    		{
    			IF(nBtnIdx = 12)
    			{
    				CLEAR_BUFFER sNumberToDial
    				sNumberToDial = "sNumberToDial,35"
    				SEND_STRING vdvAllVortexTRS232,"sIDString,sTelcoFnct[9],sNumberToDial,13"
    				CLEAR_BUFFER sNumberToDial
    			}
    			ELSE IF(nBtnIdx = 11)
    			{
    				CLEAR_BUFFER sNumberToDial
    				sNumberToDial = "sNumberToDial,42"
    				SEND_STRING vdvAllVortexTRS232,"sIDString,sTelcoFnct[9],sNumberToDial,13"
    				CLEAR_BUFFER sNumberToDial
    			}
    			ELSE
    			{
    				CLEAR_BUFFER sNumberToDial
    				sNumberToDial = "sNumberToDial,ITOA(nBtnIdx-1)"
    				SEND_STRING vdvAllVortexTRS232,"sIDString,sTelcoFnct[9],sNumberToDial,13"
    				CLEAR_BUFFER sNumberToDial
    			}
    		}
    		SEND_COMMAND vdvAllVortexTP, "'@TXT',2,sNumberToDial"
    	}
    }
    
  • drewbertdrewbert Posts: 3
    text box

    thanks so much for that guidance.
    here is what i ended up with...
    (would love to get feedback on this as well.)

    BUTTON_EVENT[vdvTP,102] // dial
    {
    PUSH:
    {
    SEND_STRING dvTel_Interface,"'S03PHONE1',13"
    SEND_COMMAND vdvTP,"'PPON-phone_text_box'"
    }
    }

    BUTTON_EVENT[vdvTP,103] // hang-up
    {
    PUSH:
    {
    SEND_STRING dvTel_Interface,"'S03PHONE0',13"
    SEND_COMMAND vdvTP,"'PPOF-phone_text_box'"

    SEND_COMMAND vdvTP, "'@TXT',4,''"
    CLEAR_BUFFER sNumberToDial
    }
    }

    BUTTON_EVENT[AUD_CNF_CNTRL]
    {
    PUSH:
    {
    LOCAL_VAR INTEGER nBtnIdx
    nBtnIdx = GET_LAST(AUD_CNF_CNTRL)
    IF(nBtnIdx = 11)
    {
    sNumberToDial = "sNumberToDial,'*'"
    SEND_STRING dvTel_Interface,"'S03DIAL*',13"
    }
    ELSE IF(nBtnIdx = 12)
    {
    sNumberToDial = "sNumberToDial,'#'"
    SEND_STRING dvTel_Interface,"'S03DIAL#',13"
    }
    ELSE
    {
    sNumberToDial = "sNumberToDial,ITOA(nBtnIdx-1)"
    SEND_STRING dvTel_Interface,"'S03DIAL',ITOA(nBtnIdx-1),13"
    }
    SEND_COMMAND vdvTP, "'@TXT',4,sNumberToDial"
    }
    }

    ...sry, not sure how to format it to appear in the post the way yours did.
  • drewbertdrewbert Posts: 3
    phone number entry

    any hints on how to have dashes or spaces show up?
    as in, if the first digit is 1, follow it with a space; after three digits, follow with a space; etc.

    thanks.
Sign In or Register to comment.