Code: Select all
Gui, New
Gui, Add, ListBox, w200 voptiontext, text1|text2|
Gui, Add, Button, Default gOK, OK
Gui, Show,
return
OK:
Gui, Submit
;KeyWait, LButton, D, L
Click, 642, 358
SendInput %optiontext%
ExitApp
Code: Select all
Gui, New
Gui, Add, ListBox, w200 voptiontext, text1|text2|
Gui, Add, Button, Default gOK, OK
Gui, Show,
return
OK:
Gui, Submit
;KeyWait, LButton, D, L
Click, 642, 358
SendInput %optiontext%
ExitApp
Code: Select all
myGui := Gui()
myLB := myGui.AddListBox("w200 voptiontext", ["text1", "text2"])
myBtn := myGui.AddButton("Default", "OK")
myBtn.OnEvent("Click", MyBtn_Click)
myGui.Show()
MyBtn_Click(GuiCtrlObj, Info) {
Click 642, 358
Send myLB.Text
}
Code: Select all
#Requires Autohotkey v2.0
MyGui := Gui()
MyGui.AddListBox("w200 voptiontext", ["text1","text2"])
MyGui.AddButton("Default", "OK").OnEvent("Click", OK)
MyGui.Show()
OK(*)
{
obj := MyGui.Submit()
;KeyWait, LButton, D, L
Click(642, 358)
Send(obj.optiontext)
ExitApp
}
Code: Select all
WinActivate("ahk_class MozillaWindowClass ahk_exe firefox.exe")
Users browsing this forum: DavidP, FanaticGuru, TomDonovan and 107 guests