I've been working on converting an AutoHotkey script from v1 to v2, and I've encountered a challenge with encapsulating a Selection List GUI. I've spent hours searching for a solution online, but I haven't been able to find one. The AHK v2 help file, while comprehensive, is not very beginner-friendly, and I'm struggling to find the correct syntax.
The specific issue I'm facing involves encapsulating the GUI creation code within a function, and I want to avoid using global variables. I want to call this function, select an item from a list, and have that item returned to the caller.
I believe I'm not the only one struggling to transition from AHK v1 to AHK v2. I'm also surprised that there is no tag for AutoHotkey v2.