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 for Programming
 LabTalk Forum
 How to use a DOS command argument in LabTalk ?

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
hkkim Posted - 09/27/2012 : 03:56:18 AM
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8.1
Operating System: Windows XP

Hello!
My question is about a batch processing. Here is my example below.
The location of 'InputDesign.xlsx' is hardwired now.
Is it possible to designate the path variablely using a DOS command argument ? How can I get 'D:\Origin\' from 'Run.bat' in 'ReadDraw.ogs' ?

Thanks in advance!
hkkim
----------------------------------------------------------
Run.bat:
Origin81.exe -r (run.section(D:\Origin\ReadDraw.ogs,main))
----------------------------------------------------------
ReadDraw.ogs:
....
newbook; // create new workbook before
string fn$=D:\Origin\InputDesign.xlsx;
if(0 == exist(fn$) ) return; // Check for 'not exist'
impexcel fname:=fn$; // Import Excel file
----------------------------------------------------------
2   L A T E S T    R E P L I E S    (Newest First)
hkkim Posted - 09/28/2012 : 01:29:38 AM
Hello, Penn!

My question was solved with your help. I checked LabTalk Wiki site as your suggestion. Thank you so much! Happy thanksgiving day! ^:^

hkkim
Penn Posted - 09/27/2012 : 05:57:40 AM
Hi hkkim,

You can read the document for run.section() here. You can provide the argument for this method to pass into the section in the ogs. Maybe you can try:

Run.bat:
Origin81.exe -r run.section(D:\Origin\ReadDraw.ogs, main, "D:\Origin\")

ReadDraw.ogs:
...
string fn$=%1InputDesign.xlsx; // if you hope to use here, %1 hold the first argument passed by the run.section method
...

Penn

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