Jump to content
Developer Wiki and Function Reference Links ×

Escaping hung scripts


Recommended Posts

I've managed to produce several scripts that have gone into a loop never to return, and had to force quit VW to escape.

I haven't found a "button" for escape in the manual. Is there? or do I need to do something at the start of the script along the lines of;

BEGIN

IF

Keydown(esc)THEN

End

ELSE

Begin............

Would this work?

cheers,

N.

Link to comment

If memory serves you are macin. Command + . or esc will exit an infinite loop.

Sometimes it takes a number of tries before v-works will notice what you're doing.

Some particularly nasty ones that i"ve managed to produce wouldn't respond for 30 secs or so and after numerous pokes at the keyboard.

Link to comment

BTW your idea would not work as I understand things.

When you enter a loop nothing else can happen except the repetion of code within that loop until the exit condition is met or you force escape. There's no awareness of anything outside of the loop while it is executing.

Link to comment

You can first try your scripts using {$debug}. If you get a loop, just stop the execution... and you can see where and why you get stuck!

I use BBedit temples that always include {debug}, I just need to ad or remove the '$'

Esc seems to work OK as long you don't touch another key before.

Link to comment

quote:

Originally posted by ccroft:

If memory serves you are macin. Command + . or esc will exit an infinite loop.

Sometimes it takes a number of tries before v-works will notice what you're doing.

Some particularly nasty ones that i"ve managed to produce wouldn't respond for 30 secs or so and after numerous pokes at the keyboard.

Ahah,

I just didn't hammer away at the Esc (and/or Cmd . for long enough. :-)

I use the {$debug} but only after I've jumped straight in to running it and found it's all turned pear shaped. ;-)

cheers,

N.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...