I need to create a script that insert the cursor in a specific position in a text field.
I will define that position with a $variable.
How can I do it without using the Copy or Paste script step?
You should be able to set the cursor position without selecting anything by setting the End Position parameter of the Set Selection script step to the same as the Start Position, creating an "empty" selection at the desired position. I may be misremembering the precise details, so experiment with $variable + 1 and - 1 if that doesn't quite work right.
I would use the Set Selection function: http://www.filemaker.com/11help/html/scripts_ref1.36.35.html
>> I would use the Set Selection function
Yes, that´s the one I was using but the result is... a selection, not the cursor in a position.
I thought that I solved the problem with Copy and Paste this selection, but it replaces the clipboard contents of the user and he doesn´t want me to do that.
I question the requirement, and wonder if this is better solved with a new record, rather than a large text field.
Now it works!! :-)
In this case, my customer wants to work in a laaaaarge text field instead of managing data thorough a portal. That´s the reason I have to deal with this kind of scripts.
I hope that this lack of structure doesn't come back to bite you. That same customer might insist on reports that you cannot do (without complex parsing, perhaps).
Retrieving data ...