Programmatically removing lines from the command line history?
pb
Tue, 12/29/2009 - 12:49 pm
I'm using some custom buttons on the Igor Data Browser, but I get a little peeved by all the commands that clutter up in the history when I use these buttons. As far as I can tell, there is no way to "/Q" the execution of the custom button actions. (Please correct me if I'm wrong on that one.) Can I at least find a workaround by somehow programmatically deleting the undesired lines?
Thanks!
I guess that includes selectively deleting lines from it.
Could you indicate what kind of "custom buttons" on the Data Browser you use?
Do you mean (a) custom commands you enter in the "Execute Cmd Button" or
(b) did you add extra buttons yourself using
ModifyBrowser
?If you did add your own buttons, you seem to be a programmer.
I think you can prevent Igor from echoing the command by putting an
Abort
as the last command of your custom-written function (by which I mean something
like the second example in
DisplayHelpTopic "Managing User Buttons"
)This seems a bit crude, but might be what you wanted. I agree that it would be fabulous
if one could somehow choose to have the command echoed or not (maybe via the
"Preferences" button of the DataBrowser?).
Wolfgang Harneit
P.S.: I've added a corresponding item to the wish list
January 3, 2010 at 01:44 pm - Permalink
I agree that would be a nice feature for users. For programmers using ModifyBrowser, it might also be simple to make use of the "options" parameter:
"appendUserButton={buttonName,buttonCmdStr [,options]}"
Thanks for adding this to the wish list.
Nick
January 3, 2010 at 11:37 pm - Permalink
ModifyBrowser echoCommands=0
already does the job we wanted, without the
Abort
crutch!And yes, it's mentioned in the help...
Wolfgang
January 4, 2010 at 11:43 am - Permalink