Make /k=1 default for the display command?

I spend a lot of time double clicking on my wave plots to view them. This creates the command 'Display/k=0 wave'. Is there any way of making it 'Display/k=1 wave' instead? This would save me the trouble of having to confirm I don't want to save the plot when I open it up for 2 seconds to check something.
Yes, that can be done. I was also always annoyed by this behavior, but creating a hook which activates upon opening Igor to change this was the solution. Create a procedure with the following content (which does actually more than you want, feel free to delete what is not to your liking) and make sure it is loaded automatically:
static Function IgorStartOrNewHook(igorApplicationNameStr)   // will be executed at Igor start
    String igorApplicationNameStr
    // show data browser and modify the properties
    String ModBrowser = "CreateBrowser; ModifyBrowser palette=Terrain, slashK=1, echoCommands=0,"
    // 3 effects: terrain palette for images, instant kill, disable browser command echos
    Execute/Q ModBrowser         // executes the above
End
You can also press "ALT" during clicking on the close icon of a window.
Then there will be no confirmation dialog.

Not sure what the key on macosx is.
chozo wrote:
Yes, that can be done. I was also always annoyed by this behavior, but creating a hook which activates upon opening Igor to change this was the solution. Create a procedure with the following content (which does actually more than you want, feel free to delete what is not to your liking) and make sure it is loaded automatically:
static Function IgorStartOrNewHook(igorApplicationNameStr)   // will be executed at Igor start
    String igorApplicationNameStr
    // show data browser and modify the properties
    String ModBrowser = "CreateBrowser; ModifyBrowser palette=Terrain, slashK=1, echoCommands=0,"
    // 3 effects: terrain palette for images, instant kill, disable browser command echos
    Execute/Q ModBrowser         // executes the above
End


Thanks for this. Pardon my ignorance but how do I make a procedure load automatically with Igor?
chozo wrote:
Yes, that can be done. I was also always annoyed by this behavior, but creating a hook which activates upon opening Igor to change this was the solution. Create a procedure with the following content (which does actually more than you want, feel free to delete what is not to your liking) and make sure it is loaded automatically:
static Function IgorStartOrNewHook(igorApplicationNameStr)   // will be executed at Igor start
    String igorApplicationNameStr
    // show data browser and modify the properties
    String ModBrowser = "CreateBrowser; ModifyBrowser palette=Terrain, slashK=1, echoCommands=0,"
    // 3 effects: terrain palette for images, instant kill, disable browser command echos
    Execute/Q ModBrowser         // executes the above
End


Using Igor 6.34A on Macintosh, the palette, slashK, and echoCommands values are all saved to and restored from preferences automatically. It's not clear to me why you need to use your hook function.
There are several reasons for me to use this hook.
- I also use it for creating my own buttons (obviously not posted here).
- I didn't know this behavior would be saved in the preferences. Is this stated anywhere in the help? Also on Win7 the palette reverts back to the default and seems to be not saved along. I didn't look too closely but from the palette change I was deducing that I still have to do all of these changes every start.
- I wrote this like 4 years ago. Was it also saved in much earlier versions of Igor 6?
I hope that clears things up a bit.
chozo wrote:
There are several reasons for me to use this hook.
- I also use it for creating my own buttons (obviously not posted here).
- I didn't know this behavior would be saved in the preferences. Is this stated anywhere in the help? Also on Win7 the palette reverts back to the default and seems to be not saved along. I didn't look too closely but from the palette change I was deducing that I still have to do all of these changes every start.
- I wrote this like 4 years ago. Was it also saved in much earlier versions of Igor 6?
I hope that clears things up a bit.


I tested on Macintosh. The DB on Windows and Macintosh use different code bases, so it's possible that the behavior is slightly different. I think the slashK and echoCommands keywords are documented as being saved to preferences. I'm not sure about the palette.

For what it's worth, using Igor 7, all three of those options are saved to preferences on both platforms.