Jump to content

Can I reset @WorkingDir after FileOpenDialog?


4Eyes
 Share

Recommended Posts

Folks,

I want to be able to select a file with FileOpenDialog() but it changes @WorkingDir to the folder holding the file as stated in the Help file. Can I prevent that or reset @WorkingDir?

I've tried @WorkingDir = @ScriptDir but that fails.

4Eyes

Link to comment
Share on other sites

Works fine for me.

FileOpenDialog('Select File', @WorkingDir, 'All Files (*.*)')
DllCall('kernel32.dll', 'int', 'SetCurrentDirectoryW', 'wstr', @ScriptDir)
FileOpenDialog('Select File', @WorkingDir, 'All Files (*.*)')
Link to comment
Share on other sites

Yashied,

Sorry, you misinterpreted me... I was saying that before I read your reply I was trying stupid stuff.

KaFu and you too Yashied.... I didn't even see that in the help file. Blast... I really try to not post here unless I can't work it out myself, but overlooked FileChangeDir altogether. Now wiping egg off face. Sheesh.

Regards,

4Eyes

Link to comment
Share on other sites

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...