February 20, 201213 yr There's a topic from a couple of years ago on this very subject ... but it was never really resolved. http://fmforums.com/...cript-on-enter/ In my specific case, I have a layout with a single field on it. The field is set with "Go to next object using Tab/Return/Enter". I want the script to trigger with the user types a word and presses Enter. It's the simplest case of all. The OP reported he got it to work ... any idea how? Processing individual keystrokes introduces a slight field flicker on the layout, so I want to avoid that. Thanks for any assistance.
February 20, 201213 yr Author Further testing has revealed something rather quirky, in my opinion. On Object Validate will, indeed, cause my script to execute ... and the script performs properly, which means shifting to another tab on the layout in order to await further entry. But after the script executes, FMP shifts focus back to the original tab and back to the entry field. No combination of Go To Field[ ] statements in the script seems to work to take focus away. FMP always insists on going back to the field ... with the cursor still blinking in the field, as if nothing had ever happened. I'm perplexed.
February 20, 201213 yr See if this helps: http://fmforums.com/forum/topic/81779-tab-order-gotofield-misunderstanding/page__view__findpost__p__379359
February 20, 201213 yr Author Since the script has already moved the cursor to another field, and the OP does not want the 'original event' to proceed, they should end the script with Exit Script [ False ]. Simply amazing. It's nothing I would have ever thought to try. Thank you very much.
Create an account or sign in to comment