text input using modero 8400
sheeva700
Junior Member
Hi,
I need to make something that looking very simple in theory.
I try to create a 'text input' where the user can change or enter some string.
then i have to use this new string in my program.
The problem is how to do that ?
i have try 'CUSTOM_EVENT' but this seems to work with 'general button' only and not with
'text input'.
Any Body have a solution for me ?
I need to make something that looking very simple in theory.
I try to create a 'text input' where the user can change or enter some string.
then i have to use this new string in my program.
The problem is how to do that ?
i have try 'CUSTOM_EVENT' but this seems to work with 'general button' only and not with
'text input'.
Any Body have a solution for me ?
Comments
-
Pop Up a keyboard, enter the text and hit enter (done?). You can then trap that string in the string_event handler in a data_event for the TP being used. Just set up a data_event for port 1 of that TP.
-
Hi VAV,
Thank's for this informations
Just a question, if the user have to enter only numerical value can i use on a numerical keypad (like in setup page for ip adresse etc..) in the same way ?
Anyway, Thank's a lot. -
Sure, you just need to trap the keypad's name in the TP's port 1 data_event instead of the keyboard's name.
-
Great !
Thank's VAV. -
Not so great....

Hi VAV,
I think is maybe better if i explain the context.
So,
I write a new Module the module use port 3 for every button (like 10001:3:1)
Main Source is controled by 10001:1:1
Module is controled by 10001:3:1
i this module i try to trap string comming from virtual keyboard popup previously pasted from system page template like indicated in TPdesign 4 documentation.
Every button & input box of _keyboard popup is pointing to port 0 (setup port) *** First Problem
i try to trap the string comming for _keyboard rawly like this :
DATA_EVENT[10001:0:1]
{
STRING:
{
SELECT
{
ACTIVE (FIND_STRING(DATA.TEXT,'KEYB-',1)):
{
SEND_COMMAND xtTP,"'TEXT500-',DATA.TEXT" // DEBUG PURPOSE
}
}
}
}
as you can see, i try to trap input text from port 0 because i can't change port to 3 like every other button in my module. but when i see in netlinx notification windows absolutly no string is comming.... :-(
I have read & read again the manual (netlinx keyword & tpdesign) but i miss something.
The main aim of the keyboard input is to able the user to make some search etc...
i have try to trap string_event from the main program also without succes.
Please help.
Sorry for my poor english.
Dominique. -
After you paste the system template kp/kb into your your TPD4 workspace you can rename the page and then use that name to pop it up when you need. Then change the name on the text inut button/field to Port3KEYB-. Usually I use the devices name or something but in this example I'm referencing the device port it's associated with for clarity.
The first data event and function go in your main code and the 2nd data_event goes into your module. In affect you create a relay.
You could also change all the port numbers on the kp/kb and handle this in code you write to do so but that's considerably more work.DATA_EVENT [dvTP_Array] //port 1 TP Array { ONLINE: { ON [DATA.DEVICE,1] ; } OFFLINE: { OFF [DATA.DEVICE,1] ; } ONERROR: { //SEND_STRING 0 ....... } STRING: { fnHandleTP_Strings(DATA.DEVICE,DATA.TEXT) ; } } DEFINE_FUNCTION fnHandleTP_Strings(DEV iTP,CHAR iBuff[]) { SELECT { ACTIVE(find_string(DATA.TEXT,'Port1KEYB-',1)): { } ACTIVE(find_string(DATA.TEXT,'Port2KEYB-',1)): { } ACTIVE(find_string(DATA.TEXT,'Port3KEYB-',1)): { SEND_COMMAND vdvYourDevice,"iBuff" ; } } iBuff = '' ; RETURN ; } DATA_EVENT [vdvYourDevice] //in your module { ONLINE: { } OFFLINE: { } ONERROR: { } COMMAND: { fnDebug("'RCVD DATA_EVENT COMMAND String: ',DATA.TEXT,', line-<',ITOA(__LINE__),'>'") ; SELECT { ACTIVE(find_string(DATA.TEXT,'Port3KEYB-',1)): { STACK_VAR CHAR cTEMP[255] ; remove_string(DATA.TEXT,'Port3KEYB-',1) cTEMP = DATA.TEXT ; } ACTIVE(find_string(DATA.TEXT,"'SomeOtherCommand?'",1)): { } } } } -
YEEEEES !
Thank you very much VAV.
Everything is working fine !
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums
