Source language: Translate to:

Delete function

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Delete function

Postby Trainman » Wed Sep 02, 2009 9:19 am

I have made a set of Buttons that allow me to enter text (letters) using a touch screen.

To enter text I used

Code: Select all
SetVar "[SearchStr]" "![SearchStr]A"


I have forgot one thing, How do I delete a letter if I enter it by mistake.
i.e. If I enter two A's when I only need one.

Yours

Trainman
Trainman
 
Posts: 113
Joined: Fri Apr 01, 2005 10:21 am
Location: England

Postby Gaev » Wed Sep 02, 2009 10:05 am

Trainman:
Code: Select all
StrLen "[SearchStr]" "[Size]"
If "[Size]" ">" "0"
   SubStr "[SearchStr]" "1" "[Size]-1" "[SearchStr]"
EndIf
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Trainman » Wed Sep 02, 2009 12:06 pm

Gaev

Thank you for the code, I will add it to the project.

Yours

Trainman.
Trainman
 
Posts: 113
Joined: Fri Apr 01, 2005 10:21 am
Location: England


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest

cron