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
 Problem with script execution

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
ibvmt Posted - 06/09/2005 : 08:03:00 AM
Origin Version (Select Help-->About Origin): 7.5 sr5
Operating System: Win XP pro
Hello
I have problems with script execution.
I put calculation steps on user buttons.
Each button runs a script (run.file cmd).
This works fine.
Now I have a button to run all calculations (several run.file cmds).
The first script imports an ASCII file.
The second script starts already, when the progress bar stays at 99%.
So I don't get the desired results, because the data isn't there yet.
Any suggestions?
Thanks
Peter
1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 06/09/2005 : 10:27:33 AM
Hi Peter,

You can avoid most, probably all, of those problems by launching your button scripts with run.section rather than run.file.

1. Launch CodeBuilder and select File > New.
2. In New File dialog select LabTalk Script File.
3. Enter a file name and enter the same Location you currently use for your script files.
4. Click OK to create and open the file.
5. Edit the file to look something like this...

[Button1]
// Paste your scripts for the first button here

[Button2]
// Paste scripts for second button

// Add similar sections for all except the Run All button.
// That section should look like this...

[RunAll]
run.section(,Button1);
run.section(,Button2);
// etc.

Now change your button settings (View > Toolbars > Button Groups) as follows...

Button 1 settings:
File Name: enter path\name selected in Step 3 above
Section Name: Button1

Button 2 settings:
File Name: same as Button 1
Section Name: Button2

Run All settings:
File Name: same
Section Name: RunAll

Your scripts will perform better and also be easier to maintain when organized in that fashion.

Mike Buess
Origin WebRing Member

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