FileSelectFile not working with AHK_H

Post AHK_H specific scripts & libraries and discuss the usage and development of HotKeyIt's fork/branch
User avatar
dd900
Posts: 121
Joined: 27 Oct 2013, 16:03

FileSelectFile not working with AHK_H

06 Dec 2021, 16:44

Latest 64bit & 32bit Unicode AHK_H v1

This causes AHK_H to hang indefinitely.
FileSelectFile, exe, 3,, Select Executable, Exe Files (*.exe)

I've also tried SKAN's FileSelectFile()
which gives the same result.

Edit 1:
DllCalls to comdlg32.dll\GetSaveFileName and comdlg32.dll\GetOpenFileName seem to be where the issue is happening using SKAN's function.

Edit 2:
Still trying.
I've created a dll in C# with exported functions. I used OpenFileDialog from System.Windows.Forms instead of Microsoft.Win32. The dll works as expected with AHK_L, but I'm still getting the same hanging issue when trying to open a file using AHK_H.
Ahk Code
C# Code

Edit 3:
This is still happening. It stopped for about three days and everything worked fine. Now it is back to hanging every time I try to open a file. I can hear an error noise but there is no popup or messagebox anywhere.
keylo
Posts: 52
Joined: 21 Oct 2020, 21:03

Re: FileSelectFile not working with AHK_H

14 Aug 2023, 18:32

From the manual:>> Known limitation: A timer that launches during the display of a FileSelectFile dialog will postpone the effect of the user's clicks inside the dialog until after the timer finishes. To work around this, avoid using timers whose subroutines take a long time to finish, or disable all timers during the dialog:

Thread, NoTimers
sleep,500
FileSelectFile, OutputVar
Thread, NoTimers, false

Return to “AutoHotkey_H”

Who is online

Users browsing this forum: No registered users and 15 guests