Script to run form with dropdown ahk scripts in folder

Get help with using AutoHotkey and its commands and hotkeys
schnarkle
Posts: 13
Joined: 29 Mar 2016, 16:47

Script to run form with dropdown ahk scripts in folder

27 Feb 2019, 15:33

Hi,

I've got a folder full of ahk scripts. Each script will download one comic based on comic name/url and date.
The user picks the comic from dropdown and date. It then is supposed to run the selected .ahk file and exit.
1111.png
1111.png (11.06 KiB) Viewed 250 times
2222.png
2222.png (14.16 KiB) Viewed 250 times
unfortunately I'm missing something obvious here an I think it's not passing the filename to run?
can someone help please?

Code: Select all

#NoEnv
Folder := A_ScriptDir . "\array"
Gui, Add, DropDownList, x76 y1 w300 vPFL,
Gui, Show, x131 y91 h377 w477, Doug's Script
GoSub, DDL
gui, add, DateTime, vmydate altsubmit
Gui, add, Button, gGo ym, Go
Gui, Show
return

Go:
Gui, Submit
Year := SubStr(mydate,1,4)
Month := SubStr(mydate,5,2)
Day := SubStr(mydate,7,2)
SetWorkingDir, %A_Desktop%\comics
Return

DDL:
Loop, %Folder%\*.ahk
{
   GuiControl, , PFL, %A_LoopFileName%   ; this will [color=#008000]add[/color] an entry to the DDL control
}
Return

GuiClose:
ExitApp

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Chunjee, Google [Bot], HPW, tmplinshi and 230 guests