Re: [Komodo-beta] Need to access command output tab from Python macro
by Jeff Griffiths other posts by this author
Jan 30 2007 9:08AM messages near this date
view in the new Beta List Site
Re: [Komodo-beta] Need to access command output tab from Python macro
|
Re: [Komodo-beta] Need to access command output tab from Python macro
The helper run command scenario may seem kludgy but there are some
neat things you can do, for example:
//JS
var file = komodo.interplate("%F");
var cmd_part = komodo.findPart('command', 'mycmd', 'container');
var cmd = "perl myperlscript --file " + file
cmd_part.value = cmd;
cmd_part.invoke();
So basically you can manipulate the 'value' of the run command part
on the fly in a Macro, then run the command and benefit with some of
the fancier features of a run command.
cheers, JeffG
On Tue, Jan 30, 2007 at 11:50:58AM -0500, Brandon Corfman wrote:
> Hmm, let me make sure I understand ... so my toolbox would have a macro
> that would run to generate and validate the input, but I would need a
> second "helper" Run Command that would exist only to be called by the
> macro and put the output into the Command Output tab?
>
> If that's the case, I'm not fond of a "helper" Run Command that just
> sits in the toolbox, but if I gotta, I gotta. :) I'm sure you guys will
> improve it in the future as you understand what we're trying to do with
> macros.
>
> Best regards,
> Brandon
>
> Trent Mick wrote:
> > Brandon Corfman wrote:
> >> Shane,
> >>
> >> I'm writing a Python macro that extracts file, line and content
> >> information, and I'd like to put the info into a list in the command
> >> output tab so the user can double-click on it and jump to a
> >> particular line in a file. (In other words, the same functionality
> >> that exists in a toolbox command with the "Parse output with" and
> >> "Show parsed output as a list" options.) Can you give me some
> >> pointers? (I'd use the Command functionality directly, but I need the
> >> flexibility/programmability of a macro to report problems, check
> >> input, pass both line and column values, etc.)
> >
> > There is no direct way to do this with a macro. I think the best way
> > to do this right now would be to write a script that does that "report
> > problems, check input, pass both line and column values, etc." and
> > then use a Run Command to run it and parse its output.
> >
> > Trent
> >
>
> _______________________________________________
> Komodo-beta mailing list
> Komodo-beta@[...].com
> http://listserv.ActiveState.com/mailman/listinfo/komodo-beta
_______________________________________________
Komodo-beta mailing list
Komodo-beta@[...].com
http://listserv.ActiveState.com/mailman/listinfo/komodo-beta
Thread:
Brandon Corfman
Trent Mick
Brandon Corfman
Jeff Griffiths
Brandon Corfman
Trent Mick
Brandon Corfman
Kevin Benton
Trent Mick
Kevin Benton
|