Jump to content

How can I type a "backspace" with a script?


HALBURN
 Share

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

Recommended Posts

I am creating an on screen keyboard for a touch screen and I can not figure out how to send a command that executes a backspace or a (delete).

I need to navigate forwards, backwards and delete one letter at a time. Any suggestions?

Link to comment
Share on other sites

You can read the current position of the cursor using the Get( ActiveSelectionStart ) and Get( ActiveSelectionSize ) functions and change it using the companion script step Set Selection. This way you can move back and forth. To delete individual characters you can use the Clear script step.

Link to comment
Share on other sites

See also the demo file posted here.

Regarding your second question, see:

Help > Creating a database > Working with formulas and functions > Identifying text constants and special characters in formulas

Thanks for your sample file post.

Link to comment
Share on other sites

You can read the current position of the cursor using the Get( ActiveSelectionStart ) and Get( ActiveSelectionSize ) functions and change it using the companion script step Set Selection. This way you can move back and forth. To delete individual characters you can use the Clear script step.

I have read up on the get functions that you mentioned but I have not had any luck trying implement what you have described.

Link to comment
Share on other sites

After some sleep the scripts in the posted samples made more sense. I kept getting confused between script functions and calculation function. So much has changed since FM 5.5.

I've just about got it all working. Thanks for everyone's help.

Link to comment
Share on other sites

You can read the current position of the cursor using the Get( ActiveSelectionStart ) and Get( ActiveSelectionSize ) functions and change it using the companion script step Set Selection. This way you can move back and forth. To delete individual characters you can use the Clear script step.

I've got the navigation working, and I can delete characters one at a time, but I can not keep the "Get ActiveSelection" script step from highlighting characters so new text can be inserted without deleting a character.

Link to comment
Share on other sites

This topic is 5653 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
 Share

×
×
  • Create New...

Important Information

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