Home AMX User Forum AMX General Discussion

How to save the text written with a virtual keyboard

Hello,

i?ve got a virtual keyboard, and i need to take the sentence written with it, and store it in a variable.
The problem is that the button in which the sentence is typed is defined as "Address Port: 0-Setup; Address Code (4): Keyboard: Text Area -single line", so i tried to get the text of this button with the next code:

CUSTOM_EVENT[1002:8:2,4,1001]
{

stack_var char texto[20]

texto = custom.text

send_string 5001:0:0, "'Llega el texto: ',texto"

}

BUTTON_EVENT[1002:8:2,1]
{
push:
{
send_command dvTpiProSetup,"'?TXT-4,1'"
}

}


But it doesn?t work, the query is sent, but i never receive a Custom_Event response. Maybe because it is a SetUp Port? Any idea?

Thanks to all!

Comments

  • DHawthorneDHawthorne Posts: 4,584
    Text from the keyboard text area always is generated as a DATA_EVENT on port 1. Check your STRING: handler on port one of the panel.
  • MorgoZMorgoZ Posts: 116
    Ok, thanks!!!!
Sign In or Register to comment.