Jump to content

FileSelectFolder - Problem with Path


Recommended Posts

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 by GajjarTejas
Link to comment
Share on other sites

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

Posted Image

Link to comment
Share on other sites

  • Moderators

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

#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

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...