the code below trigger an element into a listbox when i doubleclick it.
I want to modify it in order to react either if doubleclick it or if i go over it with the arrows and press "Enter". It have to work in both ways.
Thank you so much
Code: Select all
Gui, font, s10, Arial Gui, Add, ListBox, x10 y10 w350 h600 vMyScript gLBox, %lista% Gui, Show Return GuiClose: GUI, destroy ExitApp return LBox: SetCapsLockState, Off If (A_GuiControlEvent != "DoubleClick") ;If user didn't double click the listbox Return ;Do nothing. Gui, Submit, NoHide ;Submit the data so we can see the value of Servizio. If(!MyScript) ;If there is no value (if nothing has been selected on double click) Return ;Do nothing. Else ;If there is a value ... ... ...