Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7383 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

hi...once in a whiloe when I'm testing script with a loop I'll goof and miss a step and create infinite loop, one that has no end. Is there a way to halt or exit the loop with keyboard commands? When this occurs I have to reboot the Mac to halt the loop.

thanks in advance.

pcourterelle

Posted

If you don't have Allow User Abort turned off, then you should be able to hit Escape (Cmd-. I believe for Mac) Otherwise, try closing the file, either by clicking on the file's X or using the Mac equivalent of Ctrl-W (File -> Close). This will often work to close a looping file.

Posted

Another good idea, especially if you have a Loop within a Loop, is to put a button on the layout (temporarily) with the script step "Halt Script." That'll stop it. Of course, one always remembers to create the button WHILE FileMaker is stuck in the loop :-]

Posted

It's good practice to put something like this:

Exit Loop If( Status (CurrentModifierKeys) = 1 and gDeveloperStatus = 1 )

...inside all loops. That way you can always get out by holding the shift key. In this example, gDeveloperStatus is simply a global field that allows you to "turn off" the exit ability if you don't want your users to have it. So you can leave the Exit Loop in all your scripts, and turn them all off or on at once by just clicking the gDeveloperStatus checkbox (which is sitting on your hidden "Developer" layout, naturally -- another good practice).

This topic is 7383 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.