Hi Guys,
Currently I am facing problem when I am calling a child script from the main script or parent script which is included in a loop.
What is happening is though the no of sheets read from the excel sheet is 2 but the called script is able run only once.
I tried in many ways to do the same.. but not successful.
Can't we include a script within a loop?
Am I doing wrong? I cheked in the child script also.. there is no variable collision..
Plz help...
The code I am using is:
=====================================
If>Test_Sheet_Names_count=0,END
Let>k=0
Repeat>k
Let>k=k+1
MessageModal>1:%k%
//ExeSheet is the variable in "StartExecution" script
//need to be set to proper sheet name to execute tcs
Let>ExeSheet=Test_Sheet_Names_%k%
MessageModal>sheet_name=%ExeSheet% k=%k% sheetcnt=%Test_Sheet_Names_count%
Include>%SCRIPT_DIR%\StartExecution.scp
Until>k,Test_Sheet_Names_count
SRT>END
MessageModal>No sheets for execution is mentioned in the input excel file%CRLF%Hence aborting executions
Goto>CloseAll
END>END
Label>CloseAll
VBRun>CloseExcel
exit[/b]
Calling a child script within a loop by using Include>
Moderators: JRL, Dorian (MJT support)
-
- Pro Scripter
- Posts: 63
- Joined: Thu Dec 10, 2009 8:13 am
-
- Pro Scripter
- Posts: 63
- Joined: Thu Dec 10, 2009 8:13 am
Sorry
Sorry... I made a mistake.. Yes we can call any script any number of times from main script...
Actually I made a mistake by putting a "goto" in the child script directly to the CloseAll label.. It was a bug..
Sorry .. plz don't waste your time for my stupidity
Actually I made a mistake by putting a "goto" in the child script directly to the CloseAll label.. It was a bug..
Sorry .. plz don't waste your time for my stupidity
