Jump to content

Recommended Posts

Posted (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 by GajjarTejas
Posted

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

  • Moderators
Posted

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!

Posted

#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

Posted

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 :bye:

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
  • Recently Browsing   0 members

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