rservis Posted February 4, 2007 Posted February 4, 2007 Hi, Calling all experts, please help - really stuck for a few days now..... Am building a touchscreen layout and I'm stuck on 2 buttons. I have all the alphabet and numbers being inserted into fields via the [insert Text] command. How do i recreate the Enter/Carridge return key and also a backspace function key on a button, reproducing the same results as if a keyboard was present. Thanks, Roy
Stuart Taylor Posted February 4, 2007 Posted February 4, 2007 Use Enter Calculated Result or Set Field not insert text Return Script = Set Field [ Field ; Field & "¶" ] Backspace Script = Set Field [ Field ; Left ( Field ; Length ( Field ) - 1 ) ] Depends if you have one or multiple fields For Enter Calculated Result you would have to calc the contents of the active field and select all whilst Entering the Calculated Result
comment Posted February 4, 2007 Posted February 4, 2007 That's not going to work well if the cursor is in the middle of text. To insert a carriage return: Insert Calculated Result [ Textfield; ¶ ] Backspace key: If [ not Get ( ActiveSelectionSize ) ] Set Selection [ Textfield; Start Position: Get ( ActiveSelectionStart ) - 1; End Position: Get ( ActiveSelectionStart ) - 1 ] End If Clear [ ]
rservis Posted February 5, 2007 Author Posted February 5, 2007 Thanks Stuart T & Comment, Really appreciate both your help, this was driving me mad!! Thanks again, Roy
rservis Posted February 5, 2007 Author Posted February 5, 2007 Hi Comment & StuartT, What is the best way to implement this into a layout that had various user entry fields on it, I want to remove the need for a keyboard - the database has to be touchscreen driven. Many thanks Roy
stuhanna Posted July 22, 2007 Posted July 22, 2007 Hi Roy - I'm assuming you ultimately had success with your touchsceen keyboard. I am trying to script the keying of numbers into a field so that they are in succession, ie 1234.50 , (they need to be numbers because they figure in to caluclations) How does one script to enter the numbers in succession as opposed to overwriting the existing character? Thanks in advance for your help!
rservis Posted July 24, 2007 Author Posted July 24, 2007 Hi Stuhanna, Mine is setup as a keyboard on screen and each key has a script attached to it. So if it was the number 1 you wanted, the script would read: Insert text ["1"] and make sure there is not a tick in select entire contents. This will enable you to keep adding more numbers without overwriting the previous one. You can specify the field you want it to always go to as well (I choose to leave mine blank!!) Hope this helps. Regards, Roy
Recommended Posts
This topic is 6333 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 accountSign in
Already have an account? Sign in here.
Sign In Now