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

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

Recommended Posts

Posted

Thought I'd see if anyone has any cleaver ways to terminate a script in a controlled manner.

Currently I use the get active modifier keys to accomplish this, pseudo code example:

Allow user abort off

Show message explaining operation and to abort activate caps lock

If caps lock active

tell user to turn it off and try again

Exit Script

EndIf

Loop

Exit loop if caps lock active

Do a bunch of critical scripts that cannot be aborted during their operation

GotoNext Record exit after last

EndLoop

Only problem is one customer who can't seem to grasp the concept of reading messages and understanding the concept of turning off the caps lock.

I like using the caps lock, as some of the critical scripts can take time to complete, and I don't want someone sitting their holding the shift key, or other modifier key.

The scripts have layouts flying around offscreen so I didn't want to go back to the original layout, turn user abort off and pause with delay, allowing the cancel button to show up, as that takes time away from the script when its running.

Just looking for other ways that I've not thought of to do this.

Posted

Can you try and explain again what is it you're trying to accomplish? I didn't get what role caps lock plays here. I am not even sure it should play a role in communicating with a script: IOW, what it's to you what my caps lock status is (says the user to the developer)?

Posted

Well maybe you could just use a OnObjectKeyStroke ( or layout ) script trigger, and have the triggered script set a stop flag and show a message that the script will be stopped when the current loop is finished.'

And then you could simply use the phrase "Press any key" or what ever key you desire, and the user will be notified of the result of his action right away.

Posted

Well maybe you could just use a OnObjectKeyStroke ( or layout ) script trigger, and have the triggered script set a stop flag and show a message that the script will be stopped when the current loop is finished.'

What makes you think the triggered script will run before the looping script has finished processing all records?

Posted

FMP sees modifier key presses even when it's running in the background: so of you ran a script, switched to Word then pressed CapsLock, FMP will see the modifier key and respond.

The test file demonstrates this.

test script.fp7.zip

This topic is 4744 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.