Typing out multiple lines of new commands

Since the Igor 7 command window can handle multiple lines of code, it would be great to be able to type out multiple lines of new code. It appears like all the basic functionality is already in place; one can copy many lines of code from an editor allowing multiple lines (e.g., command history, procedure files, notepad) and then run the lines, even after additional editing. It looks like all that is missing is a new command line hotkey, like ctrl + enter, that would allow one to move (carriage return) to a new line instead of executing the current command line(s).

Perhaps this already exists and I just haven't figured out the right hotkey yet? I can see that there's a bit of a semantic issue in that the command line is called the command line (rather than the command lines), but this term is already outdated in Igor 7.

I would find the function especially useful for collecting multiple commands from the command history and pasting them each into their own line on the command line. Currently, I have to run each line before pasting in the next (which is troublesome because I lose the spot I've scrolled to in the command history) or use semi-colons to put them together (which is hard to keep track of and sometimes overruns the length limit for one line).
Have you tried writing your commands in an Igor notebook? To execute you select them and type Ctrl-Enter.
Thanks for the reply. I think that will be almost as convenient, though it will bug me to have to keep track of a second window.

Given that I can get the the command line to do what I initially described in more cumbersome ways (for example by starting off by copying into the command line as many lines I need, with one space in each line as place holder), I'm still a little surprised that the option to type a carriage return in the command line doesn't already exist.
Eventually I decided on this solution http://www.igorexchange.com/node/7482. It's still not ideal, but it's getting there.

I should probably make a separate wishlist post for this, but while trying some possibilities for inserting new lines on the command line, I realized that it would be nice to have a flag to make Menu options run silently (without printing to command line). /Q would be a natural choice, but that shuts off the menu option (though the explanation of the Menu/Q flag is missing from the Menu description in Igor Reference.ihf). If Menu options could run silently, I believe that I could just make my own hotkey to do this.
I wonder if you would find the CommandPanel project preferable:

http://www.igorexchange.com/project/CommandPanel

CommandPanel.ipf provides an alternative command-line interface for Igor Pro.

Features



  • bash-like alias expansion, brace expansion, and pathname expansion.

  • complete operation, function, data folder, wave, variable, string name.

  • filter outputs or completion candidates with words (regular expressions)




--Jim Prouty
Software Engineer, WaveMetrics, Inc.
That project does indeed look useful. I'll keep it in mind. Thanks for the reply.
aoa wrote:
Given that I can get the the command line to do what I initially described in more cumbersome ways (for example by starting off by copying into the command line as many lines I need, with one space in each line as place holder), I'm still a little surprised that the option to type a carriage return in the command line doesn't already exist.

It's just a failure of imagination. When I made the red line movable so that you could actually *see* multiple lines, it was such an improvement over Igor 6 that I stopped there! It *would* be nice to have a way to enter a second line, wouldn't it? I have entered an enhancement request ticket.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
johnweeks wrote:
When I made the red line movable so that you could actually *see* multiple lines, it was such an improvement over Igor 6 that I stopped there! It *would* be nice to have a way to enter a second line, wouldn't it? I have entered an enhancement request ticket.


Good to hear it might one day be added. You're right that seeing multiple lines has been a big improvement, and it has indeed also been nice to be able to enter a second line (I'm still favoring the button I mentioned above, because I haven't figured out how to make a shortcut/macro key run without printing to the command line or other inconvenience).

I'll take the liberty of adding a few more thoughts while on the topic of command line / GUI data entry convenience:

It would also be nice to have a left-right scroll bar below the "red line". Right now, you have to mouse/key over to parts of text lines that aren't shown, whereas you can use the left-right scroll bar in the command history.

Text-wrapping of the command history seems like it acts a bit oddly. On my computer, the history text seems to wrap when it's longer than some arbitrary length, which is usually longer than the actual width of the history area (maybe the wrapping cut-off is set once and for all when an experiment starts? I haven't checked); either way, the history text wrapping doesn't seem to update when the command window width changes (even for commands printed after the window size change). Maybe this behavior is intentional and that's why the history area gets a scroll bar?

I always find myself wishing for scrolling and text-wrapping when using the data editing box at the top of tables. Like entering text on the command line, I have to scroll with the keyboard or mouse to move to parts of the line that aren't shown. The "Edit text cell" window is helpful, but if you want to copy data from a cell to other windows in the same experiment (say the command line or another table), you have to close that window and lose the location of your selection.
aoa wrote:
It would also be nice to have a left-right scroll bar below the "red line". Right now, you have to mouse/key over to parts of text lines that aren't shown, whereas you can use the left-right scroll bar in the command history.
The command line is really intended for single commands; it's an accommodation for copying and pasting commands that it handles multiple lines. You really want the functionality of a notebook in a single line, and it's simply not designed for that. You may want to use notebook windows more, where you can freely scroll and edit, and use Ctrl-Enter to copy the selection to the command line and run it. Also, you can right-click and select Copy to Cmd Line.

Quote:
Text-wrapping of the command history seems like it acts a bit oddly. On my computer, the history text seems to wrap when it's longer than some arbitrary length, which is usually longer than the actual width of the history area (maybe the wrapping cut-off is set once and for all when an experiment starts? I haven't checked); either way, the history text wrapping doesn't seem to update when the command window width changes (even for commands printed after the window size change). Maybe this behavior is intentional and that's why the history area gets a scroll bar?
The history isn't supposed to wrap. If you can send a recipe to demonstrate such wrapping, send it to support@wavemetrics.com. I will fix it.

Quote:
I always find myself wishing for scrolling and text-wrapping when using the data editing box at the top of tables. Like entering text on the command line, I have to scroll with the keyboard or mouse to move to parts of the line that aren't shown. The "Edit text cell" window is helpful, but if you want to copy data from a cell to other windows in the same experiment (say the command line or another table), you have to close that window and lose the location of your selection.
Again, you are trying to use a simple tool for complex actions. If you click a cell in the table and select Copy, it will copy the contents of the cell. You don't need to go to the entry line editor to copy cell contents, unless you want to copy a subset. The addition of text waves to Igor created a need to edit table cells containing lots of text, and that's why I created the Edit Text Cell window.

If you have enough screen space, making the table window wider gives more room to the entry editor.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
johnweeks wrote:
The history isn't supposed to wrap. If you can send a recipe to demonstrate such wrapping, send it to support@wavemetrics.com. I will fix it.



I've come to understand that the text wrapping I've seen was due to the default settings of the print function (specifically the /LEN flag)

Thanks again