Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control* funcs now require control param #323

Open
Banaanae opened this issue Jan 3, 2025 · 0 comments
Open

Control* funcs now require control param #323

Banaanae opened this issue Jan 3, 2025 · 0 comments

Comments

@Banaanae
Copy link
Collaborator

Banaanae commented Jan 3, 2025

V1:

Gui, Add, Checkbox,, ABC 123
Gui, Show
Return

g::
ControlGet, OutputVar, Checked,,, %A_ScriptName%
MsgBox % OutputVar ; 1
Return

V2 (Converted):

myGui := Gui()
myGui.Add("Checkbox", , "ABC 123")
myGui.Show()
Return

g::
{ ; V1toV2: Added bracket
global ; V1toV2: Made function global
OutputVar := ControlGetChecked(, A_ScriptName)
MsgBox(OutputVar) ; 1
Return
} ; V1toV2: Added bracket in the end

V2 (Expected):

?

Not sure if we can do anything, former got the topmost control, but doesn't seem to be any easy way to do that, maybe just output a warning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant