Page 1 of 1

SetCurrentDirectory() & SaveFileRequester()

Posted: Sun Jan 03, 2010 11:02 pm
by WilliamL
How do I set the directory so that, when the SaveFileRequester() is called, a folder of my choice is already selected. Right now the folder that appears seems to be the last folder that was used.

Code: Select all

;GetCurrentDirectory() ; < works fine and shows the folder I want!
SetCurrentDirectory(GetCurrentDirectory()) ; < has no effect on changing which folder is shown below
filename$=SaveFileRequester("Save chart...",Chart\cname+".SXChart","Text (*.txt) | *.SXChart; *.txt",0)

Re: SetCurrentDirectory() & SaveFileRequester()

Posted: Mon Jan 04, 2010 3:14 am
by Demivec
PB Manual wrote:Filename$ = SaveFileRequester(Title$, DefaultFile$, Pattern$, PatternPosition)
The DefaultFile$ is useful to initialise the requester in the right directory and with the right filename.

Does that work for you?

Re: SetCurrentDirectory() & SaveFileRequester()

Posted: Mon Jan 04, 2010 4:15 am
by WilliamL
Oh, yes, I see that it actually says that the folder is initialized with SaveFileRequester().

Code: Select all

filename$=SaveFileRequester("Save chart...",FilePath+Chart\cname+".SXChart","Text (*.txt) | *.SXChart; *.txt",0)
This (code above) gives me the whole path but did not give the folder that was at the end of the path. (still the random folder)

I was reading the thread 'How to: Change current directory' and was off trying to SetCurrentDirectory.

Anyway, neither is working although the your method should work.

[two days later]
Maybe I should report it as a bug?