Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

How to get the controlID of GUI control just created?


  • Please log in to reply
2 replies to this topic
scsnake
  • Members
  • 33 posts
  • Last active: Oct 16 2015 01:51 PM
  • Joined: 24 Mar 2009
sorry it sounds a stupid question but i just can't figure out >"<

I created a group of radio buttons but without any text (i put pictures beside them), so how do i GuiControl each of them after creating them?

Is there something like this:
Gui, blabla
Gui +LastFound
WinGet, var, ID
so i can get the id of each radio button after creating them?

MasterFocus
  • Moderators
  • 4323 posts
  • Last active: Jan 28 2016 01:38 AM
  • Joined: 08 Apr 2009
<!-- m -->http://www.autohotke... ... herOptions<!-- m -->

See "HwndOutputVar".

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Antonio Fran├ža -- git.io -- github.com -- ahk4.net -- sites.google.com -- ahkscript.org

Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.


a_h_k
  • Members
  • 685 posts
  • Last active: Sep 28 2015 12:32 AM
  • Joined: 02 Feb 2008
Gui, Add, Radio, vControlID, Text
eg: Gui, Add, Radio, vMyRadio1, No text here

It's not easily found in the doco, but the "v" parameter ("control's associated output variable") has TWO uses:
1)

When the Gui Submit command is used ... The radio button's associated output variable (if any) receives the number 1 for "on" and 0 for "off"

2) Allows you to set the ControlID/ClassNN of the control