Jump to content

Recommended Posts

Posted

This UDF allows to handle SHBrowseForFolderW with more options, such as multi selection (checkboxes), window position, controls text and more.

 

Example:

#include 'BrowseForFolder.au3'

$iFlags = BitOR($BIF_MULTISELECT, $BIF_TOPMOST, $BIF_SELECTONLYROOT, $BIF_RETURNONLYFSDIRS, $BIF_BROWSEINCLUDEFILES, $BIF_EDITBOX)
Dim $aCtrlsTxt[6] = ['Select files from the list below.', '', 'Dir:', 'New dir', 'Select', 'Cancel']

;Since $BIF_SELECTONLYROOT is set, @SystemDir wont be selected (or returned) as @WindowsDir is a root for this path
$sPreCheck = @WindowsDir & '|' & @ProgramFilesDir & '|' & @SystemDir
$sRet = _BrowseForFolder('Title', 'C:\', @ProgramFilesDir, $sPreCheck, $iFlags, $aCtrlsTxt, 0)

If Not @error Then
    $aSel = StringSplit($sRet, '|')
    $sRet = ''
    
    For $i = 1 To $aSel[0]
        $sRet &= ($sRet ? @CRLF : '') & $aSel[$i]
    Next
    
    MsgBox(64, @ScriptName, 'Selected:' & @CRLF & @CRLF & $sRet)
EndIf

 

BrowseForFolder_0.1.zipFetching info...

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

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