The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 problem with run.file

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
vistec Posted - 03/23/2006 : 10:03:01 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
2   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 03/23/2006 : 10:34:12 AM
Hi vistec,

Hideo pointed out error above with custom.ogs being used instead of the test.ogs, and also no need to specify name of file if same file.

Also note that if you have sections in your ogs file, you cannot call them with run.file. You need to use run.section. Furthermore, you need to specify in run.section command to call [main]. The code under [main] is currently not called automatically unless specified.

So, for example, if your test.ogs file is as below:


type hi there!;
[Main]
type " Hallo";
run.section(,S2);
run.section(,S1);
type "Ende";
[S1]
type "S1";
return;
[S2]
type "S2";

return;



Then if you use the command:
run.file(R:\Project\Vorlagen\Labtalk_files\test.ogs)
you will get the output:
hi there!

If you use the command:
run.section(R:\Project\Vorlagen\Labtalk_files\test.ogs)
you will get the same output:
hi there!

But if you use the command:
run.section(R:\Project\Vorlagen\Labtalk_files\test.ogs, main)
you will get the output
Hallo
S2
S1
Ende

Easwar
OriginLab



Edited by - easwar on 03/23/2006 11:24:10 AM
Hideo Fujii Posted - 03/23/2006 : 10:14:07 AM
Hi vistec,

I have noticed two things:

1) You are running test.ogs, and probably want to call S2 and S1 sections inside the test.ogs . However, your run.section specifies to call custum.ogs . If in the same .ogs file, you can simply call like: run.section(,S2);

2) You don't need "return;" at the end of the section.

Hope this helps.

--Hideo Fujii
OriginLab


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000