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
 Script execution problem

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
aminikin Posted - 10/31/2000 : 12:50:21 PM
The following problem occurs with Origin 6.0 on my Windows NT 4 system:

A script which performs as it should if started from within the script window does not execute correctly, if started via the menu (run command). Some commands seem to be ignored. For example the following simplified sequence:

if (exist(SomeGraph)==2) win -active SomeGraph;
layer -s 1;
set data_a -b 1;
set data_a -e 10;
layer -s 2;
set data_a -b 11;
set data_a -e 20;

So what I am trying to get is that in two different layers two different portions (ranges) of the data are being plotted.

However, if the script is executed by the run command, the activation of certain layers is obviously ignored, because in all layers the range would be set as chosen for the last layer (11..20 in this case).

This behaviour does not occur with the same script executed from the script window.

This drives me crazy! Is this a bug or do I misunderstand something???

Thanks for any help. Andreas

1   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 10/31/2000 : 7:06:11 PM
First, you should use ogs file. To run script from a file with the run command was only for cnf files that initilize parameters in old versions. Newer versions we recommand using ogs file. For example, put your script into the custom.ogs file and run it from the
"Custom Routine" button on the standard toolbar.

The problem with your script is the layer -s command is not reliable when a window is activated, so we always recommand using layer -o and win -o commands. You should write your script into an ogs file as follows:

in Custom.ogs, for example

[Main]
if (exist(SomeGraph)==2) win -active SomeGraph;

layer -o 1 {set data_a -b 1;set data_a -e 10};
layer -o 2 {set data_a -b 10;set data_a -e 20};

I should have used win -o SomeGraph above, but using only one activation would be fine, just not two together that would have timing problem.




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