From a8d8d6426445af309168c97cf3680e5aabcd2e79 Mon Sep 17 00:00:00 2001 From: TFWol <9045213+TFWol@users.noreply.github.com> Date: Sun, 25 Dec 2022 17:41:20 -0800 Subject: [PATCH] Add input file drag and drop support Allows dragging and dropping one or more files into the input window. I tried to follow your code scheme. I don't know how to process folders, but it may be similar to how you do files. --- namDHC.ahk | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/namDHC.ahk b/namDHC.ahk index 98cf363..f786bca 100644 --- a/namDHC.ahk +++ b/namDHC.ahk @@ -683,6 +683,10 @@ addFolderFiles() newFiles.push(a_LoopFileLongPath) } } + + case "listViewInputFiles": + loop, parse, A_GuiEvent, % "`n" + newFiles.push(a_Loopfield) } if ( newFiles.length() ) { @@ -1979,6 +1983,14 @@ removeFromArray(removeItem, byRef thisArray) return thisArray } + +; Handle input file drag and drop +;-------------------------------- +GuiDropFiles: + addFolderFiles() + return + + ; Get Windows current default font ; by SKAN ; ------------------------ @@ -2478,4 +2490,4 @@ GuiClose() quitApp() { -} \ No newline at end of file +}