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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Code Builder does not execute LT script...
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ivanovskikh

New Zealand
14 Posts

Posted - 07/28/2011 :  6:59:45 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Pro 8.5.1
Operating System: Win XP SP3

Hi,

I have a strange problem. The Code Builder does not execute a very easy LT script at all. No reports about errors or anything wrong... just doing nothing!.. However, it works properly when I run it from the Script Window. Any other LT scripts run well from the Code Builder. Could anyone suggest what the problemis is? The script is below.

%A = %(page.comments$);
wcopy 1! 2!;
wks.name$ = "Normalized";
//normalizing data in sheet "Normalized"
rnormalize -r 2 irng:=1!Col(4) method:=max orng:="Normalized"!Col(4);
rnormalize -r 2 irng:=1!Col(5) method:=max orng:="Normalized"!Col(5);
rnormalize -r 2 irng:=1!Col(6) method:=max orng:="Normalized"!Col(6);
//plotting the normalized curves
plotxy iy:="Normalized"!(1,4:6) plot:=200 ogl:=[<new template:="DESY EMIS NM_CM-1" name:=Graph>];
string GraphName$ = %H;
layer.y.from = 0.00;
layer.y.to = 1.05;
//making label
page.active = 1;
label -j 2 -s -sa -n stamp "\b(n)\nT= K\n%A";
stamp.fsize = 14;
stamp.font=font(Times New Roman);
stamp.y = layer.y.to - stamp.dy / 1.5;
stamp.x = layer.x.to - stamp.dx / 1.5;
//legend
legendupdate mode:=custom custom:=@LL;
Legend.fsize = 12;
Legend.font = font(Times New Roman);
Legend.y = layer.y.to - legend.dy / 1.8;
Legend.x = layer.x.from + legend.dx / 1.8;

The script takes data from 3 last columns, normalizes them, put into new worksheet and plot graph.

The Origin and Code Builders are attached.

cpyang

USA
1406 Posts

Posted - 07/30/2011 :  09:14:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
First, try something simpler, like

type -b hello;

then, turn on error reporting by setting

echo=1;

and then the line with the error will show.

CP
Go to Top of Page

ivanovskikh

New Zealand
14 Posts

Posted - 08/02/2011 :  02:08:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Thanks for the comment!

"type -b hello;" works fine as well as any other scripts. The problem only with the script I showed above.
I switched ECHO =1. It returns some strange message to the script window. It appears as "r=?w". In fact the first simbol is not "r". It just looks like "r". When I copy the error message to the forum post it appers as "Ú=?w".

Again the script works fine when I put into the script window.

So, I cannot understand what is going on...
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 08/04/2011 :  10:03:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
So it looks like your script has a character not being ASCII, you can try pasting that to notepad, or the script window, copy it and paste back to code builder command window.

CP
Go to Top of Page

ivanovskikh

New Zealand
14 Posts

Posted - 08/04/2011 :  5:47:43 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
All the symbols seem to be good ones (ASCII)... I copied the script to Notepad and it doesn't show any strange characters. Anyway, the script works fine when run from the Script Window!...

Thanks!

Konstantin
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000