Successive Script commands question
Posted: 09 Apr 2020, 21:54
In my external software program (Lazarus Pascal) I have this call to AA:
AASendCommand(AA_SCRIPT_RUN, PChar('Image.ClosePrevious'));
AASendCommand(AA_SCRIPT_RUN, PChar('Image.Open("' + theImage + '")'));
The intent is to close the last opened image and replace it with a new image. When I do this the script editor displays only the second command but does not execute either of these. I am guessing the first call to AA_SCRIPT_RUN opened the editor, inserted the line but did not execute because the second command came in, overwrote the first script and then did not execute because it was confused.
But if I only do this:
AASendCommand(AA_SCRIPT_RUN, PChar('Image.Open("' + theImage + '")'));
Then it does open the new image.
My question then is, does successive calls to AA_SCRIPT_RUN require some sort of delay, or a 'RUN' command of some type in the script?
Craig
AASendCommand(AA_SCRIPT_RUN, PChar('Image.ClosePrevious'));
AASendCommand(AA_SCRIPT_RUN, PChar('Image.Open("' + theImage + '")'));
The intent is to close the last opened image and replace it with a new image. When I do this the script editor displays only the second command but does not execute either of these. I am guessing the first call to AA_SCRIPT_RUN opened the editor, inserted the line but did not execute because the second command came in, overwrote the first script and then did not execute because it was confused.
But if I only do this:
AASendCommand(AA_SCRIPT_RUN, PChar('Image.Open("' + theImage + '")'));
Then it does open the new image.
My question then is, does successive calls to AA_SCRIPT_RUN require some sort of delay, or a 'RUN' command of some type in the script?
Craig