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
 need help about Macro
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Bobhao

2 Posts

Posted - 10/11/2011 :  04:39:35 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:
How can I save a macro after defination? When I open a new origin, so I can use the pre-defined macro.

greg

USA
1379 Posts

Posted - 10/11/2011 :  11:07:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Open MACROS.CNF in any text editor. Macros defined here are loaded at startup and available in any Origin session.
Go to Top of Page

Drbobshepherd

USA
Posts

Posted - 10/11/2011 :  11:14:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Lots of ways to go:

1.You could open the Command window, highlight the macro in the History panel (the left panel,)and hit return. If you do not clear your history panel, your macro will be there. Or...

2. Save your macro to a script file in your User directory, then run it whenever you open a new origin session. There are several ways to do this:
a. Use the command run.section in the Command window. Or..
b. If you saved your script as "Custom.ogs", click on the "Custom Routine" button in the Standard toolbar. Or...
c. Create your own button that runs your script. Or...
d. Add a selection to an existing menu that runs your script.

Of all options, I think the easiest is 2b.
Go to Top of Page

Drbobshepherd

USA
Posts

Posted - 10/11/2011 :  11:31:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I stand corrected. There is a simpler method, as submitted by Greg.

Humbled before greatness,

DrBobShepherd
Go to Top of Page

Bobhao

2 Posts

Posted - 10/11/2011 :  10:57:28 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot, the method given by Greg really works.
Go to Top of Page

sebbey

Germany
70 Posts

Posted - 05/10/2012 :  05:09:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
OriginPro 8.6.0G ; Windows 7 Professional

Hello Greg,

I couldn't find the file MACROS.CNF. So I tried to create a new file called MACROS.CNF and saved it in my userfiles Folder, in which the OPTION.CNF, SYSTEM.CNF,... are situated as well.

Afterwards I definded the "hello" Macro (the one from the Origin Help) in my MACROS.CNF-File and started Origin.
But typing in hello; in the script window, doesn't execute the Macro. Instead I get a command error.

What did I do wrong?

It would be perfect, if I could define a macro and use it in all Origin Projects, and not just in my currently active Project.

Thank you,
sebbey
Go to Top of Page

sebbey

Germany
70 Posts

Posted - 05/10/2012 :  05:42:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I finally found the MACROS.CNF File, but now I have a different Problem. After I added a Macro (for example the "hello" Macro) and tried to save the file, I got the Error Message "Please check if this file is opened in another program", which it is not.

Did anyone else have the same Problem?

Thanks
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