February 4, 200718 yr 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
February 4, 200718 yr 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
February 4, 200718 yr 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 [ ]
February 5, 200718 yr Author Thanks Stuart T & Comment, Really appreciate both your help, this was driving me mad!! Thanks again, Roy
February 5, 200718 yr Author 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
July 22, 200718 yr 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!
July 24, 200718 yr Author 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
Create an account or sign in to comment