BlueScreen Posted May 11, 2006 Posted May 11, 2006 Hi, Is there a way I can make force the user (using FileOpenDialog) to choose a file from 1 specific folder only and not to choose an other one ? I know I can run an IF statement after the choose and extract the folder from the filename path, but is there a way to do it w/o the IF? Thanks
Moderators SmOke_N Posted May 11, 2006 Moderators Posted May 11, 2006 Have you looked at FileSelectFolder()? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
BlueScreen Posted May 11, 2006 Author Posted May 11, 2006 Yes I have. But I want him to choose a FILE NOT a folde.
Moderators SmOke_N Posted May 11, 2006 Moderators Posted May 11, 2006 (edited) Yes I have. But I want him to choose a FILE NOT a folde.No need for the caps, I misread the file part. Edit: Gary made a custom one I think a while back in the scripts and scraps forum... Other than specifying what and where the user starts at (with the current one) ie... $Var = FileOpenDialog('Select A File From This Folder', @HomeDrive & '\MyFolder', 'Zip File Only (*.zip)', 1, 'MyZip.zip') MsgBox(0, '', $Var)I don't see how you can stop them from still surfing around. Edited May 11, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
MHz Posted May 11, 2006 Posted May 11, 2006 (edited) I know I can run an IF statement after the choose and extract the folder from the filename path, but is there a way to do it w/o the IF?FileOpenDialog changes the working directory, so use @WorkingDir after FileOpenDialog. Edited May 11, 2006 by MHz
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now