Jump to content

Recommended Posts

Posted

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

Posted

Yashied,

That did it, thank you!

I was trying to call FileOpenDialog() a 2nd time pointing back to @ScriptDir, while using ControlClick or Send to 'Ok' it, but couldn't make that work.

Regards,

4Eyes

Posted

Works fine for me.

FileOpenDialog('Select File', @WorkingDir, 'All Files (*.*)')
DllCall('kernel32.dll', 'int', 'SetCurrentDirectoryW', 'wstr', @ScriptDir)
FileOpenDialog('Select File', @WorkingDir, 'All Files (*.*)')
Posted

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

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
×
×
  • Create New...