ActiveState Community

[Macro] How to get source for last recorded macro

Posted by dafi on 2009-09-30 07:10
OS: All / Any

Maybe can be useful to other people.

After I record a macro I need to see the generated code, the macro shown below does this

if (gMacroMgr.currentMacro.length > 0) {
    ko.views.manager.doNewViewAsync(null, null, function(view) {
        view.scintilla.scimoz.text = gMacroMgr.currentMacro.join('');
        view.document.isDirty = false;
        });
}
if (gMacroMgr.currentMacro.length > 0) {
    ko.views.manager.doNewViewAsync(null, null, function(view) {
        view.scintilla.scimoz.text = gMacroMgr.currentMacro.join('');
        view.document.isDirty = false;
        });
}

This is a quick way then save to toolbox and open it

dreftymac | Wed, 2009-09-30 15:38

It's little one-off solutions like this that are really great about an extensible application like Komodo. Getting the recorded macro source code is easy enough, but this makes it a little less cumbersome.

Thanks