T O P I C R E V I E W |
Taron |
Posted - 03/31/2014 : 03:51:07 AM Origin Ver. 8.6.0 b70 Operating System: Windows 7 x64
Hi,
I am looking for a way to read out the longname of a workbook without having to active it. Currently I have to activate it first and use page.name$ to read out the workbooks longname into a string. This is not very convenient as it slows down my script considerably.
Is there any way of reading out the longname without having to activate a workbook? |
5 L A T E S T R E P L I E S (Newest First) |
lkb0221 |
Posted - 03/31/2014 : 11:31:28 AM Hi,
Yes, the brackets indicates that it is optional. Sorry I did not make it clear in the first place. For example: // window -a Book1; // Active Book1 page.longname$ = BK1; // Set page longname window -a Book2; // Active Book2 Book1!page.longname$ = ; // Will return "BK1" //
Zheng OriginLab |
Taron |
Posted - 03/31/2014 : 11:25:52 AM Thanks a lot! That's what I wanted. |
bastianb |
Posted - 03/31/2014 : 11:24:21 AM Hi,
the brackets are too much, they indicate that the including is optional
I guess this should work for you: storevar$ = Book1!page.longname$;
best regards Bastian |
Taron |
Posted - 03/31/2014 : 11:02:53 AM Thanks! So if the short name of my workbook is e.g. Book1 and I am currently in Book2 I have to enter:
storevar$ = [Book1!]page.longname$;
to access the longname of Book1 and store it in my storevariable storevar$?
Edit: I just tried it with this syntax and it doesn't work (with or without the "!"). So what would be the actual syntax in my case? |
lkb0221 |
Posted - 03/31/2014 : 09:31:10 AM Hi,
The standard syntax of page properties is actually:
[winName!]page.property =
When [winName!] is not specified, the active window is affected.
Zheng OriginLab |