Use FileSelectFile to select Folder?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
SirSocks
Posts: 360
Joined: 26 Oct 2018, 08:14

Use FileSelectFile to select Folder?

02 Jul 2019, 08:17

Hello -

How can I uses FileSelectFile to select a folder?
I do not want to use the FileSelectFolder function as I don’t like the default user interface.
This is what I’m using so far, but It’s not working.

Code: Select all

FileSelectFile, SelectedFolder, 2, %a_workingdir% , Select a folder ,folder(_)
msgbox The Path you selected is %SelectedFolder%
return

All help is appreciated,
Thank you.
hd0202
Posts: 183
Joined: 04 Oct 2013, 03:07
Location: Germany near Cologne

Re: Use FileSelectFile to select Folder?

02 Jul 2019, 10:36

Have a look at

Code: Select all

FileSelectFolder
Hubert
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Use FileSelectFile to select Folder?

02 Jul 2019, 13:21

What exactly doesn”t work?
What is the result and what is what you expect?
ciao
toralf
User avatar
flyingDman
Posts: 2817
Joined: 29 Sep 2013, 19:01

Re: Use FileSelectFile to select Folder?

02 Jul 2019, 15:20

This code here https://github.com/flipeador/Library-AutoHotkey/blob/master/dlg/ChooseFolder.ahk works but needs a tweak. The function Direxist needs to be replaced by Fileexist in all places. But then running:

Code: Select all

msgbox % ChooseFolder(Owner)
works (though it seems a bit slow). This was included in a post mentioned by @Flipeador .
14.3 & 1.3.7
User avatar
Flipeador
Posts: 1204
Joined: 15 Nov 2014, 21:31
Location: Argentina
Contact:

Re: Use FileSelectFile to select Folder?

02 Jul 2019, 15:48

@flyingDman All my code in GitHub is written for AHKv2. If he uses v1, he must use the code I posted in the post in the link I put above.
User avatar
flyingDman
Posts: 2817
Joined: 29 Sep 2013, 19:01

Re: Use FileSelectFile to select Folder?

02 Jul 2019, 16:00

I see. Well I now also see that there is a direxist function.

Code: Select all

DirExist(DirName)
{
    loop Files, % DirName, D
        return A_LoopFileAttrib
}
I did not intend to convert a v2 script back to v1. My confusion. Apologies.
14.3 & 1.3.7
User avatar
SirSocks
Posts: 360
Joined: 26 Oct 2018, 08:14

Re: Use FileSelectFile to select Folder?

02 Jul 2019, 16:28

Thanks everyone for the help so far. I'll take a closer look at all that and see what one will work best for me.
By the way I'm using AHK version V1.1.30

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 193 guests