I have a GUI with a listbox and several buttons, each button associated with a label.
Code: Select all
gui S3Gui:new, +DelimiterTab +HwndGui3Hwnd,Find files
gui font,s12
gui Add, Edit, x15 w500 -multi vS3Searchtext, %SearchText%
gui Add, Button, gS3search x+m yp-3 vS3search Default, Search file
gui Add, Button, gS3getfile vS3get x+m yp, Get file
gui Add, Button, gS3Viewfile vS3View x+m yp, View file
gui Add, Button, gS3gotofile vS3goto x+m yp, Goto file
....
S3GetFile() {
Debugtitle("S3GetFile"), debug("S3LB={}",S3LB)
gui submit, noHide
h:=regexmatch(S3LB,"^(.+) \(([0-9.]+)(K|M|G)B[^)]+\)$",X)
WriteToQueue(1, {url:"", name:X1, size:Megabytes(X2,X3), host:"", time1:A_NowUTC, time2:""})
s:="Queued download for file`n" . X1, debug(s)
msgbox,0,,%s%
guicontrol,Focus,S3Search
}
But when after that I select another line of the listbox and click the button again, nothing happens. The function S3Getfile is not executed any more.