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
 give workbook the name of another workbook
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Rookie1

Posts

Posted - 06/19/2008 :  6:28:24 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): origin 8
Operating System: xp

Hi,
i want to make a script which renames the active workbook to the long name of another workbook in the project.

example:
I have two workbooks:
1. workbook: shortname: book1 longname: MyData1
2. workbook: shortname: F1 longname: Filter1

Now the 2. workbook F1 - Filter1 is active.
I want the script to search for book1 (the 1. workbook) and use the long name of this book1 to rename the active workbook to F1 - MyData1.

It should look for the short name of the 1. workbook, because its long name will be different everytime. But the short name will be always the same.


I have no clue how to rename longnames of workbooks or get longnames of other workbooks. :((

I hope you can help me. Thanks in advance!

VincentLiu

China
Posts

Posted - 06/19/2008 :  11:55:40 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Rookie1,
You may use the following scripts to get you want:

needLongName$ = Book1!page.longname$;
win -rl %H %(needLongName$);


If you still have questions, please feel free to contact us.

Vincent
OriginLab Technical Service Team
Go to Top of Page

Rookie1

Posts

Posted - 06/20/2008 :  11:49:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi VincentLiu,
that was exactly what i was looking for :D. Thank you very much!
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