GajjarTejas Posted July 21, 2012 Share Posted July 21, 2012 (edited) I am creating an application that required the FileSelectFolder with valid path.When user select a my computer ,Control Panel path then problem with path because in my application does not define this type of path.so the required to disable the OK button when user select my computer, Control Panel types of path.How can I Disable ok button of FileSelectFolder? Edited July 21, 2012 by GajjarTejas Link to comment Share on other sites More sharing options...
NicePerson Posted July 21, 2012 Share Posted July 21, 2012 Try this: Do $var = FileSelectFolder("Choose a folder.", "") Until $var <> "Computer" And $var <> "Control Panel" MsgBox(0,"",$var & " is a valid path.") Link to comment Share on other sites More sharing options...
JohnOne Posted July 21, 2012 Share Posted July 21, 2012 Or Do $var = FileSelectFolder("Choose a folder.", "") Until Not StringInStr($var,".") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
GajjarTejas Posted July 21, 2012 Author Share Posted July 21, 2012 Thaks Friend For Your Reply but some times I see that when we select "my computer" or "control panel" the OK button is automatically disabled whats that(In 7Z FM)?Example: Point to zip File--right click on it--Extract File--Browse...(In 7Z FM)LOOK LIKE THIS Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 21, 2012 Moderators Share Posted July 21, 2012 Because those are not folders you can extact a zip file to. You can't create a folder in MyComputer, or in the Control Panel. The application is trying to help you by showing you where you can and cannot save the zip contents to. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
abberration Posted July 21, 2012 Share Posted July 21, 2012 I understand what you are looking for, but I don't think AutoIt can do exactly what you want. The closest you can come to that is to start at the user's root drive. Local $var = FileSelectFolder("Choose a folder.", @HomeDrive, 7) Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
AZJIO Posted July 21, 2012 Share Posted July 21, 2012 #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> $Gui=GUICreate('FileSelectFolder') $Button=GUICtrlCreateButton('-', 10, 10, 21, 21, $BS_ICON) GUICtrlSetImage(-1, @SystemDir & 'shell32.dll', 4, 0) GUISetState () While 1 $msg = GUIGetMsg() Switch $msg Case $Button $Path = FileSelectFolder('', '', 3, @DesktopDir, $Gui) If @error Or Not StringInStr(FileGetAttrib($Path), "D") Then ContinueLoop MsgBox(4096, 'Folder', $Path) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd My other projects or all Link to comment Share on other sites More sharing options...
GajjarTejas Posted July 22, 2012 Author Share Posted July 22, 2012 I understand what you are looking for, but I don't think AutoIt can do exactly what you want. The closest you can come to that is to start at the user's root drive. Local $var = FileSelectFolder("Choose a folder.", @HomeDrive, 7) Thats a Good Idea... ok there are many alternative way that can i do it.also thanks @AZJIO and @JLogan3o13 Link to comment Share on other sites More sharing options...
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