| T O P I C R E V I E W |
| vistec |
Posted - 03/23/2006 : 10:06:13 AM Origin Version: 7.5 SR4 Operating System: Win XP
Hello All,
I want to execute an entire Labtalkscriptfile for example:
R:\Project\Vorlagen\Labtalk_files\test.ogs
from the custom.ogs file.
My code is:
run.file(R:\Project\Vorlagen\Labtalk_files\test.ogs);
The test.ogs contains only a few lines:
[Main] type " Hallo"; run.section(custom.ogs,S2); run.section(custom.ogs,S1); type "Ende"; [S1] type "S1"; return; [S2] type "S2"; return;
Please, could anyone tell me what's wrong in this code?
Thanks a lot
Edited by - vistec on 03/23/2006 10:07:41 AM |
| 4 L A T E S T R E P L I E S (Newest First) |
| vistec |
Posted - 03/27/2006 : 05:56:10 AM Thanks a lot for your help Mike |
| Mike Buess |
Posted - 03/24/2006 : 08:11:49 AM This will run the [Main] section of your test file... run.section(R:\PROJECT\Vorlagen\Labtalk_files\test.ogs,Main);
Help > Programming > LabTalk Language Reference > Object Reference > Alphabetical Listing... > Run
Mike Buess Origin WebRing Member |
| vistec |
Posted - 03/24/2006 : 02:15:54 AM Thanks greg for your help
Is there an opportunity to call a skriptfile for example test.ogs from a skriptfile for example custom.ogs, when the called skriptfile test.ogs contains sections and when I want to call this section with run.section within this file, such as I tried in my code? May be with:
run R:\PROJECT\Vorlagen\Labtalk_files\test.ogs ??
Thanks for your help |
| greg |
Posted - 03/23/2006 : 11:47:10 AM The run.file( ) method begins execution at the beginning of a file, but it respects [section] names in the sense that if it runs into a section name, then execution ends - just like the run.section( ) method.
So your code does nothing since it ends as soon as it hits [Main].
If you want to use run.file : don't put any [sections] in the file; if you want to use [sections] : use the run.section( ) method.
Edited by - greg on 03/23/2006 11:47:45 AM |