Loop Automation Command Action

Don’t know how to split the topic :blush:
Have you tried it? Rule name is not issue I changed it still get error.

For some reason, at first I could not get this to work from the Test button at the bottom-right of the Script Editor.

function execAMC() {
  cmd.Execute('TestCommand:TestValue');
}

MessageToDisplay:

CN: [:AutomationCommandName]\rCV: [:CommandValue]

So I thought I would get funky and add it to the Close button …

Now when I click close button, I see this:


And the Test button also now works …

Hmm…So, if the Automation has been executed by ordinary way once before then it work?

Not sure. But I will say this: I have had issues with the Test facility before, many times, and has almost driven me over the edge when I know my script is good and it keeps throwing the same error over and over again.

It seems that it may not work until you save the script, close the Script screen, navigate somewhere else (or logout), then go back in to test it.

I have had this type of trouble when creating new scripts, or when I script has an error in it. It is like it gets “stuck in memory” and ignores changes, and I need to “reset cache” to get it to behave again. Maybe it is only committed to the DB after saving, then closing the script screen, and navigating away and back in.

1 Like

Oh well, I think I will stick with dynamic automation command name. Easy and work well :smile:

I have seen this behaviour albeit random as well. So Q - your take is it works fine? I have not tried it as yet @sukasem but I would be surprised if you had not closed down and saved the script by now and retried… :confused:

Yes, the helper method works fine.

1 Like

Sorry for the confusion if it created any. I think I forgot to mention but it should work fine on latest .61 refresh.

2 Likes

It does not only happen there either. I’ve notice it happen in all other setting areas as well. You could for example, create a new printer with a print job tab still been there, then go back to print job, click edit, and try to add the new printer or change to it, and it does not find it or add it to the list. You literally have to close all tabs relating to print job, navigate away from print job, then come back to it, just to see the changes

That’s no different to if updating an action having to remove, save, close, open, add on the rule.