Jump to content
Server Maintenance This Week. ×

Scripting buttons for touch screen keyboard


This topic is 1247 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi all. I'm working on a project that utilizes touch screen monitors and I am wanting to find the most efficient way of scripting an on-screen keyboard for users to enter data when prompted. The typical QWERTY keyboard with backspace, left/right arrows, Enter, etc.

If possible, if someone could direct me on how to script a single letter (say, "Q"), spacebar and Backspace I should be able to figure out the rest. Many thanks.

Link to comment
Share on other sites

4 hours ago, madman411 said:

how to script a single letter (say, "Q"), spacebar and Backspace

For any character, including space, you could do:

Insert Calculated Result [ Get ( ScriptParameter ) ]

Backspace is a bit more complex:

If [ not Get ( ActiveSelectionSize ) ]
  Set Selection [ Start PositionGet ( ActiveSelectionStart ) - 1; End PositionGet ( ActiveSelectionStart ) ]
End If 
Clear [ ]

 

  • Like 1
Link to comment
Share on other sites

21 hours ago, comment said:

For any character, including space, you could do:


Insert Calculated Result [ Get ( ScriptParameter ) ]

Backspace is a bit more complex:


If [ not Get ( ActiveSelectionSize ) ]
  Set Selection [ Start PositionGet ( ActiveSelectionStart ) - 1; End PositionGet ( ActiveSelectionStart ) ]
End If 
Clear [ ]

 

Comment - your backspace works perfectly. However I'm not sure if the get(scriptparameter) is functioning as intended, though admittedly utilizing a script parameter isn't something I'm versed very well in. The User is presented a pop-up dialogue with the keyboard laid out so it can be hidden if necessary. The script I have attached to "keys" so far is:

 

Insert Calculated Result [Target: testtext ; Get(ScriptParameter)]
Go to Object [ Object Name: "keyboard" ]

Am I missing a step?

Link to comment
Share on other sites

If you have a script that inserts the script parameter, and the button is set to perform the script with a parameter of "Q", then the character "Q" will be inserted at the current insertion point. 

I am not sure I understand your description. If you exit the target field after each character, you will lose the current insertion point - thus preventing the user from editing previously entered text.

Note that there are other complications. You specifically asked for a simple starter -but implementing shift/caps lock, for example, is not as simple.

 

Link to comment
Share on other sites

This topic is 1247 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.