I just checked, and the function Get ( ActiveSelectionStart ) returns the correct values when the cursor is in a field and you (single) click a button in two different ways:
1) You can pass the value as part of a Script Parameter attached to the button
2) You call it from within the script itself. (It doesn't need to be the first step or anything, either.)
Hope this Helps,
The key to not lose focus is simplicity. That is, do not use any of those things we almost always start script with. Instead try to do it with just one script step.
I only have the swedish version but I'm sure you get it, when I say you should use "Infoga resultat".
Best regards Magnus Fransson.
Thanks a lot. I also found the very simple solution:
Without selecting entire contents:-)
It does it with one single scriptstep.
Will have a look at your suggestion and will probably return with more:-)
BTW: Typical, after using FileMaker for so many years it is the very small simple things you forget. I of course found it as soon as I posted the question.
That is exactly what I was aiming at.