Keypad on panel
davidv
Posts: 90
If i create a keypad that I want to use to store number data would it look like this?
DEFINE_EVENT
Button_Event[dvPanel,100]
{
Push:
{
SEND_COMMAND dvPanel,"'AKEYP'"
{
}
}
}
This pops up my keypad but how do i store each button i hit on the keypad as a variable?
Buttonpushes = (Get_last,buttonpushes)
1
14
147
1478
14789
etc...
?
DEFINE_EVENT
Button_Event[dvPanel,100]
{
Push:
{
SEND_COMMAND dvPanel,"'AKEYP'"
{
}
}
}
This pops up my keypad but how do i store each button i hit on the keypad as a variable?
Buttonpushes = (Get_last,buttonpushes)
1
14
147
1478
14789
etc...
?
0
Comments
Once you have the text, you can break it apart as needed of convert it to numbers using ATOI or similar.
Jeff
Is this correct?
DEFINE_EVENT
BUTTON_EVENT[dvPanel,69]
{
Push:
{
SEND_COMMAND dvPanel,"'AKEYP'"
}
}
Data_Event[dvPanel]
{
Online:
{
Wait 25
Clear_Weather_Data()
}
STRING:
{
LOCAL_VAR CHAR cBuffer[10]
cBuffer = DATA.TEXT
SELECT
{
ACTIVE (FIND_STRING(cBuffer,'KEYP',1)):
{
REMOVE_STRING(cBuffer,'KEYP-',1)
ZIP_NUM = ("cBuffer")
cZip = ZIP_NUM
}
ACTIVE (FIND_STRING(cBuffer,'KEYB',1)):
{
REMOVE_STRING(cBuffer,'KEYB-',1)
}
}
}
}