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
 Get names of all windows in project

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
elelab Posted - 10/03/2005 : 1:35:53 PM
Origin Version : 7 SR4
Operating System: Win2K
After creating a number of graphs in a project, I often need to add the same text label to all of them. I can activate each one and paste the label, but there can be a lot of them and I'd like a LabTalk macro to set up a loop, cycle through all the existing windows and add the label to all of the windows of type Plot (using the Label command.) The LabTalk manual refers to the "Window menu window list" in a couple of places. Two questions: Can I access this "window list" from LabTalk? Is there a way to test if the window is type plot, data, or wks?

Thanks,
Tony
2   L A T E S T    R E P L I E S    (Newest First)
elelab Posted - 10/04/2005 : 4:43:11 PM
Thanks, Mike. That'll do it! I must have spent 2 hours RingTFM and on-line help, but the "Document" command just somehow didn't register as a possibility for what I wanted. (Maybe if it had been called "Project" instead of "Document".)
Mike Buess Posted - 10/03/2005 : 2:50:15 PM
Hi Tony,

The document command with the -e option will do exactly what you want. The following script loops through all graph windows in the project and applies the same script or command to each. Note that %H names the current window for each iteration and this example merely types the name to the script window.

doc -e P {
// command or script goes here, for example...
type %H;
};

...Although you don't need it in the example above you can use the exist() function to obtain the window type...

exist(%H)=;
EXIST(DATA1)=2 // if wks
EXIST(GRAPH1)=3 // graph
EXIST(MATRIX1)=5 // matrix

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 10/03/2005 3:06:48 PM

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