1 Reply Latest reply on Jul 30, 2013 9:23 AM by philmodjunk

    Saving typed text



      Saving typed text


           We have large text fields that users can easily spend an hour in creating notes.

           I need to add an "AutoSave" feature so the work is not lost if FM becomes disconnected. Users affected are remote using VPN.

           I've got the OnObjectKeystroke working and it fires a script. The script checks the character typed, and if matched sets the field. Problem is the keystroke is then appended to the end of the field, which works if typeing new, but not if modifying a sentence in the middle of the text.

           Is there a better way to do this?

        • 1. Re: Saving typed text

               Maybe use Install OnTimer to commit the record every few seconds? The ONTimerScript can use Get (SelectionStart) and Get (SelectionSize) to capture the position of the cursor and the size of any current text selection, then commits the record, then uses Set Selection to put the cursor back in the field at the correct insertion point with the correct text (if any) selected.

               Come to think of it, the same method can be used with your current script if you prefer to save this data one letter at a time.