Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

How to change name of a macro?

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

How to change name of a macro?

Post by krambriw »

Hi, I need some help from you experts,

I have a macro with an action inside. If I would like to change the name of the action I can use eg.ActionBase.GetLabel. This is working fine, no problems.

But how can I change the name of the macro itself in a similar way?

Best regards, Walter
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: How to change name of a macro?

Post by Pako »

If I understand correctly, then I think it's impossible.
A macro is automatically named when it is created (according to the action with which it is created), but later they can not.
Remember that the macro can contain multiple events.
Based on what action would the macro be automatically renamed?

Pako
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: How to change name of a macro?

Post by krambriw »

I see, you are of course right.

I was looking how to cheat using functions in the eg built in functions like eg.actionThread.Func(macroItem.RenameTo)(label) in file NewMacro.py

My very best regards, Walter
Post Reply