Skip to content

Instantly share code, notes, and snippets.

@RaptorX
Created October 18, 2024 22:16
Show Gist options
  • Save RaptorX/f8b8fecf1106e637c23f2be33eb70292 to your computer and use it in GitHub Desktop.
Save RaptorX/f8b8fecf1106e637c23f2be33eb70292 to your computer and use it in GitHub Desktop.
Capture radio button name on click
#Requires AutoHotkey v2
#SingleInstance force
myGui := Gui()
myGui.OnEvent("Close", GuiClose)
myGui.Add("Radio", "vSDK", "SDK").OnEvent("Click", ShowText)
myGui.Add("Radio","vChannel yp", "Channel Review").OnEvent("Click", ShowText)
myGui.Add("Radio","vEmail yp", "Email").OnEvent("Click", ShowText)
myGui.show()
Return
ShowText(obj,*)=> MsgBox(obj.name) ; use arrow functions when the function only has 1 action
GuiClose(*) => ExitApp()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment