Page 1 of 1

Command-Period not Stopping Scripts ...

Posted: Mon Oct 18, 2021 4:52 pm
by AlasdairScottUK
So I've been away from LC for a few releases. Back on it with 9-6-4 on my Mac and I'm noticing a few behaviours that seem way different.
First and foremost ... while a script is executing, Command-Period no longer seems to stop it.

Am I missing something here?

Thanks!

Re: Command-Period not Stopping Scripts ...

Posted: Mon Oct 18, 2021 5:59 pm
by jmburnod
Hi,
Did you check the allowInterrupts = true ?
Best regards
Jean-Marc

Re: Command-Period not Stopping Scripts ...

Posted: Tue Oct 19, 2021 2:18 pm
by AlasdairScottUK
Good suggestion - however

Code: Select all

allowInterrupts = true
so that's not it.
Most odd - I've not noticed this behaviour on any previous release.

Thanks for the reply!
AX

Re: Command-Period not Stopping Scripts ...

Posted: Wed Oct 27, 2021 7:06 pm
by AlasdairScottUK
Now upgraded to 9_6_5 rc2

Even the most simple button script is not terminated by Command-Period.

Is this expected behaviour?

Re: Command-Period not Stopping Scripts ...

Posted: Wed Oct 27, 2021 10:55 pm
by dunbarx
Hi.

This should not happen.

But here is something to check. If I have a button and a field 1, and this in the button script:

Code: Select all

on mouseUp
   repeat until the optionKey is down --just for safety
      add 1 to fld 1
      wait 1
   end repeat
end mouseUp
I usually cannot stop that handler with only a quick press of cmd-period. I have to hold it for just a bit. Is it possible that somewhere you have the same set-up?

Craig

Re: Command-Period not Stopping Scripts ...

Posted: Thu Oct 28, 2021 12:32 am
by FourthWorld
AlasdairScottUK wrote:
Wed Oct 27, 2021 7:06 pm
Even the most simple button script...
What is that script?

Re: Command-Period not Stopping Scripts ...

Posted: Thu Oct 28, 2021 6:00 am
by AndyP
dunbarx wrote:
Wed Oct 27, 2021 10:55 pm
Hi.

This should not happen.

But here is something to check. If I have a button and a field 1, and this in the button script:

Code: Select all

on mouseUp
   repeat until the optionKey is down --just for safety
      add 1 to fld 1
      wait 1
   end repeat
end mouseUp
I usually cannot stop that handler with only a quick press of cmd-period. I have to hold it for just a bit. Is it possible that somewhere you have the same set-up?

Craig
Hi Craig, in your test script the wait is blocking any messages, which is why you need to hold the keys down to give a chance for messages to be captured and acted upon. Your keys down messages only have a chance of being captured during the short period around the wait.

Try adding with messages to the wait

Code: Select all

Wait 1 with messages
Does that help?

Re: Command-Period not Stopping Scripts ...

Posted: Thu Oct 28, 2021 2:53 pm
by dunbarx
Andy.

That was my point, that the OP might have such a thing lurking in a handler somewhere.

Interestingly, I tried "with messages" with several wait times, and noticed no real difference.

Craig