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
 Script on marked windows in Project Explorer

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
cougar2 Posted - 04/28/2004 : 06:32:32 AM
Dear all,

is there a way to execute a Labtalk script on the windows that the user marks in the Project Explorer (using the mouse, one window or several by using Shift)?
My idea is to get the window names of some graphs (target %a), rename them in order to plot them in a Layout-Template window that was inserted before and then rename back to restore the old window names. Doing this manually with %a and %b it would look like this:

win -t Layout Layout_8graphs.otp Layout_01; // insert Layout template
%a=Graph_11472_4;
%b=Graph02; // Layout template has placeholder for Graph0X
win -r %a %b;
win -r %b %a; // rename back
doc -uw;

Is there a way?
Best regards,
Cougar

2   L A T E S T    R E P L I E S    (Newest First)
cougar2 Posted - 05/03/2004 : 07:53:17 AM
Hi Mike,

that works really great, the script on the homepage is kind of neat. And it also does the thing with the template that I wanted so thank you very much indeed.

Regards,

Cougar

Mike Buess Posted - 04/29/2004 : 12:07:22 PM
Hi Cougar,

There is no way to manually select multiple windows like you suggest. You can create a multiple window selection dialog in LabTalk as described in the "Creating multiple selection dialogs" topic at http://labtalk.nmrtools.com.

Another method available in Origin 7.0 or later (and possibly 6.1) is to create a project folder and move the graphs you want on the layout to that folder. Then select View->View Windows->Active Folder, select the new folder in Project Explorer and run a script based on this...

nn=0;
win -t Layout Layout_8graphs.otp Layout_01;
doc -ef P {
// loop through all plot windows in folder
%A=%H; // plot window name
nn++;
%B=Graph$(nn); // placeholder name
win -r %A %B;
win -r %B %A;
doc -uw;
};

I'm not convinced the layout will turn out like you expect but it might be worth trying.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 04/29/2004 12:35:37 PM

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