How to Loop actions inserting different set of 6 character text each time?

Ah damn. My macro loops about 500 times and takes a long time to finish. Is it possible to stop it during a run and let it pick up where it left off? I looked at the debugger to do this but couldn’t work it out.

Hey Simon,

Too bad.

You might be able to emplace your text with AppleScript and System Events in the background, but you'd have to test to find out.

There's not a built-in mechanism to pause a running macro.

I don't think the debugger will let you pause an already running macro by simply activating it.

It might be possible to use a variable in your macro to manage a breakpoint:

    set pauseMyMacro to TRUE
    if pauseMyMacro = TRUE
        activate breakpoint

So you can probably work out logics that will let you pause the macro.

-Chris

Since it appears that KM/AppleScript can't get the job done in the background, you may want to backup and look at other possible solutions.

You never did state exactly what you are trying to do/automate in Illustrator, but it has a large community, and I believe JavaScript is the internal language that Adobe uses. So you might try doing some Google searches on your objective and/or posting in the Adobe forums for help.

Just for the record though, it would be nice to know what are tying to achieve in Illustrator.

Yes, the debugger will allow you to pause an already running macro.

However you are better off to do it yourself in the macro with a variable since pausing it in the middle might leave it in a very context sensitive state - better to pause it at the end of the loop so that the start of the loop will always re-set the conditions (eg re-activate the target application).

So for example:

  • Set variable "Paused Macro" to 0
  • Repeat 500 times
    • Activate Target Application
    • Do stuff
    • Pause Until Paused Macro is 0

or better, finish with:

  • Do stuff
  • if Paused Macro is not 0
    • Notify "Macro Paused"
    • Pause Until Paused Macro is 0
    • Notify "Macro Resumed"

Then you can have another macro that toggles Pause Macro (set variable Pause Macros to calculation 1-Pause Macros).