I have the AutoHotKey EnterPad Keyboard/Pad with 120 Programmable Keys
It works by sending a Hotkey press for each key to an AutoHotKey script which has a Label function
for eah key named 001
through 120
Below is my AHK Label function called when key 115
is pressed.
My code allows me to select rows in any Windows Listview component and it will show a popup GUI window with a textbox filled in with the data from the selected rows with each column separated with a TAB
space. I can then copy or save it or view it whatever I like.
;---------------------------------------------------------------------115-----
; Copy Selected Windows Listview Items to Tab Spaced Text - Show popup Window Gui
; https://superuser.com/questions/814831/copy-to-clipboard-from-table-list-in-a-program-on-windows
115:
Gui, SelectedListRowsTextGui:Destroy
MouseGetPos, , , , ListView_hwnd, 2 ;2 means return HWND
ControlGet, selected_row_text, List, Selected, , ahk_id %ListView_hwnd%
Gui, SelectedListRowsTextGui: +ToolWindow +AlwaysOnTop -Caption
Gui, SelectedListRowsTextGui:Add, Edit, vUnused_variable x11 y15 w950 h66, %selected_row_text%
Gui, SelectedListRowsTextGui:Add, Button, x62 y84 w140 h30 +Center, Close
Gui, SelectedListRowsTextGui:Show, ,
return
ButtonClose:
Gui, SelectedListRowsTextGui:Destroy
return
Return
Problem:
My issue is that once the popup window is opened from my AHK GUI, my CloseButton
label dose not get called when I click the close button.
I realize it likely has something to do with it being nested under the key 115s label function however I am not sure how to best achieve the desired result?
I tried moving the CloseButton
label outside of the 115 label
however it still is not called from the GUI's Close
button click.
You can see I have named the GUI SelectedListRowsTextGui
this is to allow this Enterpad.ahk script to contain many GUI windows for different actions it will perform.
Any help in the proper way of doing this please?
Preview of the GUI window this script creates when listview items are selected and this Label function is called.....