Run Program problem

John K.
Bacau,

Jun 16, 2011
55 Posts

0  |  0  

Re: Run Program problem

Hi there! I'm developing an application in which I have to run several (5) ATEasy programs within the app. So, I try to execute this:
Run App.Programs(0)  !the first program in the list
Run App.Programs(1)
Run App.Programs(2)
Run App.Programs(3)
Run App.Programs(4)   !the last program in the list

..but only the first program is executed! Can anyone tell me why? Or how can I remediate this so my 5 programs will run one after another (1,2,3,4 and 5)? I tried to put WaitForEvent() between the Run statements but no use...it stucks after the firs program is executed, even if I click the mouse or do something (an event to occur)... I just don't know how to fix this! :(. Please help me!

DrATEasy (Ron Y.)
Mission Viejo, CA

Jun 16, 2011
367 Posts

0  |  0  

Re: Run Program problem

The run statement does not return back.

You can use the following code:

System.OnEndProgram()
{    
    if Program.Index<4
    Run EndEvents App.Programs(ProgramIndex+1)
    endif      
}

Assuming you project start program was set to the first program in the project properties window.

John K.
Bacau,

Jun 20, 2011
55 Posts

0  |  0  

Re: Run Program problem

Unfortunately, this isn't working for me :(. It doesn't arrive to the System.OnEndProgram(). Any other way to do this?

DrATEasy (Ron Y.)
Mission Viejo, CA

Jun 20, 2011
367 Posts

0  |  0  

Re: Run Program problem

Are you using the test executive? If yes, Add the following:

System.OnInit()
{
    TestExec Execution RunProgram(App.Programs(0).Name, TRUE)
}

This will force the first run to run after the app is started.

And then in System.OnEndProgram add the following

System.OnEndProgram()
{
   if Program.Index<4
    TestExec Execution RunProgram(App.Programs(Program.Index+1).Name, TRUE)
   endif
}

I tried it with the test exec example (testexec.prj) and it works (2 programs only).



Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]