Set a variable to set the "Open Experiment Dialog Box" root folder?

Hi,
All of my data and igor experiments are in a single folder (with multiple subfolders.) However, this folder is deep in my home directory. It's slightly annoying to have to find my "data" folder every time I open igor, more annoying when I have to dig deeper into the hierarchy. Even more annoying when igor doesn't remember which folder I'm working in and resets it's folder back to the home folder. Can I write a script that sets the default root directory for igor so that when I "Open" an experiment or "Load waves" it automatically goes to that folder? It's most annoying with some of my scripts. My scripts often have "open file" dialogs, where I select multiple files for the macro to process. Those dialogs often revert back to my home directory, so when I have to run that macro 2-5 times, it gets annoying. (And no, it's not something I can or want to loop within the macro itself. The 2nd-5th times I run the program depend on the results from the 1st, so the files I choose for the 2nd depend on what I see the first time around.) I'll probably just find a way to make it run every time I start igor if it's something I have to run and not just set from a preference file or similar.

Thanks!
Ah, you replied before I could edit my question.

I see that the Pathinfo command would work.

I could simply do a
String DataFolderPath="Path:To:DataFolder"
NewPath DataFolder, DataFolderPath
PathInfo /S DataFolder

when I start igor and it should just open from there. Then I could change it depending on which folder I was working in.

Alternatively I could change the plist file in the application settings folder to change the directory (until it changes again due to me navigating.) How often is the plist file updated?

Now, the next question is this, is there anyway to run a script on Igor startup unattended? (Meaning I wouldn't have to launch it.)
reepingk wrote:
Now, the next question is this, is there anyway to run a script on Igor startup unattended? (Meaning I wouldn't have to launch it.)


Put an IgorStartOrNewHook function like this in a procedure file in your Igor Procedures folder.
Make sure auto-compile is on.

static Function IgorStartOrNewHook(appstr)
    String appstr
   
    Print "Igor starting up..."
    // Put your code here
    return 0    // don't circumvent other IgorStartOrNewHooks.
End


--Jim Prouty
Software Engineer, WaveMetrics, Inc.