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
 Code builder vs Script window.

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
Davek Posted - 06/04/2014 : 1:05:18 PM
Origin Ver. 9.1 and Service Release 237
The following script works from the script window but not when executed from code builder, addionally the list window needs to be refreshed twice to show the ranges when executed from the script window.
Is it me or is it a bug, thanks Dave

P1$ = J2814270;
L1$= "Label"+P1.mid(6,3)$;
C1$=P1.mid(4,1)$;
range r1=P1$;

P2$ = J2814271;
L2$= "Label"+P2.mid(6,3)$;
C2$=P2.mid(4,1)$;
range r2=P2$;

P3$ = J2814272;
L3$= "Label"+P3.mid(6,3)$;
C3$=P3.mid(4,1)$;
range r3=P3$;

P4$ = J2814273;
L4$= "Label"+P4.mid(6,3)$;
C4$=P4.mid(4,1)$;
range r4=P4$;

P5$ = J2814350;
L5$= "Label"+P5.mid(6,3)$;
C5$=P5.mid(4,1)$;
range r5=P5$;

P6$ = J2814351;
L6$= "Label"+P6.mid(6,3)$;
C6$=P6.mid(4,1)$;
range r6=P6$;

P7$ = J2814353;
L7$= "Label"+P7.mid(6,3)$;
C7$=P7.mid(4,1)$;
range r7=P7$;

P8$ = J2814365;
L8$= "Label"+P8.mid(6,3)$;
C8$=P8.mid(4,1)$;
range r8=P8$;
2   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 06/06/2014 : 09:27:10 AM
I don't know what you mean by "list window", so the only thing I can offer is that Code Builder has it's own scope, so declared variables (like your ranges) will be out of scope immediately after you execute your snippet in Code Builder. Those assigned without declaration (those strings) are global in scope and will persist.
Once you execute in the script window, then the ranges persist. If you again execute in Code Builder, those ranges will have the same names and values as the ones declared in the Script Window, but they too will disappear after Code Builder finishes.
lkb0221 Posted - 06/04/2014 : 2:03:37 PM
Hi, Dave

What do you mean not working in code builder? Any error messages?
What does your script do anyway? It seems just some variable declaration...

Zheng
OriginLab

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