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
 Origin Forum
 Run script after opening 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
peter.cook Posted - 08/26/2003 : 05:05:17 AM
Hi,

I don't know whether to be delighted or annoyed...

I have had personal discussions awhile back with OriginLab about running script after opening an .opj file. This could be done (version 6.1) by redefining the endopen macro BUT this only worked when the .opj file was part of a command line eg \\..\Origin61\Origin61.exe temp.opj. The ideal was to open Origin by double-clicking on an .opj file (as the user would prefer to do) but no code could be set to run after the project had actually opened. However, in testing a beta version. I noticed a commented out DocAfter macro in the macros.cnf file. Lo and behold, I can now define this to do
exactly what I want. It is and would have been extremely useful as we have numerous (1000s) of saved project files that have an associated string variable eg ProjectID that I can now pick up by script and load the associated macros and menus eg
def DocAfter {
%T=ProjectID[1]$;
run %Tmacros.cnf;
};

Especially useful with a server-client set-up and where we have multiple versions of the same application eg Linear_v1, Linear_v2.

All this with the user just double-clicking on an .opj file!

This code works for Origin 7 but I'm not sure for which (SR) versions.

I can find no documentation or mention in the help files either.

I think the DocAfter macro will run after an Origin project file is opened however and the endopen macro still only works if the opj file is passed via a command line.

DocAfter macro runs before EndOpen macro.

Regards,

Pete

2   L A T E S T    R E P L I E S    (Newest First)
peter.cook Posted - 08/27/2003 : 03:27:52 AM
Hi Mike,

Thanks for note.

Maybe..

I sent the note to advertise what I regard as a very useful function particularly in the context of managing multiple versions of multiple applications for multiple users (could be clearer!) and to drop a hint..

Cheers,

Pete

Mike Buess Posted - 08/26/2003 : 07:38:27 AM
Hi Pete,

I still have a copy of 6.1 on my old laptop and just tried DocAfter there... doesn't work. Perhaps DocAfter was implemented in 7.0 as a result of your discussions w/OriginLab and they just forgot to document that fact.

Mike Buess
Origin WebRing Member

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