K1200 Posted February 20, 2012 Posted February 20, 2012 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.
K1200 Posted February 20, 2012 Author Posted February 20, 2012 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.
comment Posted February 20, 2012 Posted February 20, 2012 See if this helps: http://fmforums.com/forum/topic/81779-tab-order-gotofield-misunderstanding/page__view__findpost__p__379359
K1200 Posted February 20, 2012 Author Posted February 20, 2012 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.
Recommended Posts
This topic is 4933 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now