Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When target 1

Status
Not open for further replies.

MCiD1

Technical User
Nov 11, 2003
4
IT
HI,
sorry for my bad english!
i have a problem with "When target" command.
here a part of my script:

when TARGET 1 "SYNTAX ERROR" call mmlerror
when TARGET 2 "SEMANTIC ERROR" call mmlerror
when TARGET 3 "DX ERROR" call mmlerror

when the target is trigged one to time, no problems.
when in the same page 2 target is trigged, in my case usually "SEMANTIC ERROR" and "DX ERROR" the script is blocked and does not go ahead.

someone can help me using simple words?
 
Has the mmlerror procedure completed by the time the second error on the page is displayed? Off the top of my head, I think ASPECT does handle multiple whens getting queued up and will process them one by one.

Can you post your script so I can see if anything obvious jumps out at me?


aspect@aspectscripting.com
 
Thank you for your fast reply
there are cases in which the error it is introduced alone but there are cases in which the two errors they appear at the same time. In this case the script is blocked.

however when the second error on the page is displayed the mmlerror procedure is not completed.

Exists an option that blocks the others "when target" when one is trigged?

my script have 1900 lines its too big to post...

 
What may be occurring in your case since both when target commands are calling the same procedure is that the first target has not been finished processing when the second target is detected. If so, what occurs is the first procedure call is interrupted by the second. The first call should be resumed and completed after the second one has been completely processed, but this interruption could possibly cause problems to the first call.

You could try adding the command:

set aspect whensuspend ON

to the beginning of your script so that one when command cannot interrupt another when command that has already called a procedure.


aspect@aspectscripting.com
 
Great!
After your first suggestion, I had resolved with "waitquiet 1" in the mmlerror procedure, but with "set aspect whensuspend ON" it works better and its more "elegant".

it was the option that I tried and that I did not know!

Thank you very much!




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top