Numeric Keypad Script

Share your scripts written for the Script Device in this forum.
Post Reply
James D
Senior Member
Posts: 134
Joined: Wed Jun 06, 2007 3:30 pm
Location: Baja California

Numeric Keypad Script

Post by James D »

Attach is a script I have for a numeric keypad with the help of scripts I found on the forum...Very Elementary, still learning this scripting stuff. Keep the script coming!!! No matter how small. It helps me to learn coding and vb script.
Here is the actual script and also attached is a HB export to be imported if you chose too.

Dim KbdStr, CursorStr

CursorStr = ""
KbdStr=GetPropertyValue ("NUMERICAL.NUMBER Buffer")

If GetPropertyValue ("NUMERICAL.NUMBER Key") = "Enter" Then
KbdStr = ""
ElseIf GetPropertyValue ("NUMERICAL.NUMBER Key") = "CLR" Then
KbdStr = ""
'CloseRemotePanel "Keyboard"
Else
If GetPropertyValue ("NUMERICAL.Shift State") = "Off" Then
KbdStr = KbdStr & LCase(GetPropertyValue ("NUMERICAL.NUMBER Key"))
Else
KbdStr = KbdStr & UCase(GetPropertyValue ("NUMERICAL.NUMBER Key"))
End if

End If

CursorRatio = CInt((Len(KbdStr)) * 1.00)

CursorStr = String(CursorRatio,"*")

SetPropertyValue "NUMERICAL.NUMBER Cursor", CursorStr

SetPropertyValue "NUMERICAL.NUMBER Buffer", KbdStr

NumLength = CInt(Len(KbdStr))

If NumLength > 4 then
SetPropertyValue "NUMERICAL.NUMBER Buffer", ""
SetPropertyValue "NUMERICAL.NUMBER Cursor", ""
End if
sleep 299
numeric_screen.jpg
numeric_screen.jpg (26.85 KiB) Viewed 25315 times
Attachments
NUMERIC KEYPAD.hbx
(9.46 KiB) Downloaded 997 times
Post Reply