Keyboard in TP
adys
Posts: 395
Hi all
I am trying to create a simple password screen ( I know I have it build in but I need to use our skin)
I looked at the keyboard implementation in the MAX ui module and duplicated the screen.
It works on the system keyboard mechanizm on port 1 only.
Also, the code open it with this command:
SEND_COMMAND Panel, "'@AKB-;Enter System Password:'" // Ask for new name
Now I don't undestand, how it know what screen to open?
the screen name is _keyboard.
is this mean I can have only one keyboard in my project?
I don't understand..
Does anybody have a simpel idea on creating a simple password screen?
Thanks
Ady.
I am trying to create a simple password screen ( I know I have it build in but I need to use our skin)
I looked at the keyboard implementation in the MAX ui module and duplicated the screen.
It works on the system keyboard mechanizm on port 1 only.
Also, the code open it with this command:
SEND_COMMAND Panel, "'@AKB-;Enter System Password:'" // Ask for new name
Now I don't undestand, how it know what screen to open?
the screen name is _keyboard.
is this mean I can have only one keyboard in my project?
I don't understand..
Does anybody have a simpel idea on creating a simple password screen?
Thanks
Ady.
0
Comments
Why dont you create a popup page that looks like a keyboard or number pad. Create buttons for each letter or number. Have a stored password as a char variable in define start or create a password set button and have the customer set it on the panel. Once the password is set you would just have each key on the popup page equal a value and if the values added together equal the stored password then you can perfrom your desired function. Be sure to have a different channel code for each key.
does this help?
Take a look at the attached keypad I skinned. Also attached is a quick and dirty skin of a keyboard, for color matching only.
JB
Thanks a lot
alessandro
Are you doing a data_event on the TP? If it's the same keyboard as the system keyboard it'll show up as a data_event.
I see the message on string on data_event. But Only on port 1? Can I receive the string on other port? How?
Thanks
Alessandro
I found out where the __keypad is hiding.
I copied it to the project and in the name _keypad (it changed automaticly)
I changed it just for a check, and I can see that when puttin password protection in the TPDesign button property, it still bring me the general system dialog and not the new one.
What should I do?
Thanks
Ady.
You can look for this with:
Char sTEXT[100]
Data_Event[dvTP]
{
String:
{
Local Var CHAR sTRASH
sTEXT=DATA.TEXT
IF(Find_String(sTEXT,'B-',1))
{
sTRASH=REMOVE_STRING(sTEXT,'B-',1) // Text you want remains
}
}
}
JB
Only works on port 1.
JB
I managed to open the popup in the code with the AKEYP- commnad and to get the text with the data event.
So simple, but didn't find any implementation for this anywhere... I found an example indisde the MAX UI module.
I couldn't find 'PKEYB' in the docs anywhere, but it works on my CV7 (v2.72.6). I'm guessing that all G4 panels have this command built in. (To AMX - can someone please add 'PKEYB' to the online AMX-PI documentation?)
I just thought someone may be interested in this tip, in case they are creating a password entry page.
Yours,
Roger McLean
Swinburne University
I found PKEYB all over AMX-PI, as well as @PKP, @PKB. Most of these commands have been available from the beginning.
Well that's odd - I still can't find 'PKEYB' in the online AMX-PI (using it's built-in search). 'PKEYP' certainly gets numerous hits, but there is not a single hit for 'PKEYB'. I'm getting the same results for '@PKB' vs '@PKP'. Which panels have the keyboard (not keypad) listed?
Roger.
JB
You can also do something similar in TPD4 by selecting the button used to display the text and under the 'general' tab enter a * in the 'password character' field. What this does is displays a * instead of the value when a key is pressed, e.g. 1234 would appear **** instead.
--John