| 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 |
|
|