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

Gui conversion issues #281

Open
andymbody opened this issue Aug 10, 2024 · 3 comments
Open

Gui conversion issues #281

andymbody opened this issue Aug 10, 2024 · 3 comments

Comments

@andymbody
Copy link
Contributor

andymbody commented Aug 10, 2024

https://www.autohotkey.com/boards/viewtopic.php?p=581354#p581354

Will fill in details later

V1:

Gui, ClipGui: New, +hwndClGui

Gui, ClipGui: Add, Text, % "Center x" . Margin . " y" . Margin .  " w" . Margin*2 . " h" . 20 . " vCH" . A_Index . " hwndBot" . A_Index, % StrLen(this.clips[A_Index]) . " characters"

cmd=%1%

V2 (Converted):

ClipGui. New("+hwndClGui")

ClipGui. Add("Text", "Center x" . Margin . " y" . Margin .  " w" . Margin*2 . " h" . 20 . " vCH" . A_Index . " . A_Index, StrLen(this.clips[A_Index]) . " characters")
Bot" := ogcTextCH.hwnd

cmd := 1

V2 (Expected):

@Banaanae
Copy link
Collaborator

V2 (Expected):

ClipGui := Gui(), ClGui := ClipGui.Hwnd

; Not really possible - see below

cmd:=_1

Issue 1:
Easy fix

Issue 2:
It looks like this control is created in a loop, so "+hwndVar" . A_Index could create Var1, Var2 etc
afaik there isn't anyway to do this outside of cases like this, and because now you can't make a hwnd var inside the command (you use hwndVar := GuiCtrl.hwnd, and hwndVar%A_Index% is invalid)

Issue 3:
Another variable issue, valid in v1 not in v2

Banaanae added a commit that referenced this issue Aug 13, 2024
Banaanae added a commit that referenced this issue Aug 19, 2024
@Banaanae
Copy link
Collaborator

Issue 3 seems to be this
https://www.autohotkey.com/docs/v1/Variables.htm#CommandLine
Not sure if it will be fixable..

@Banaanae
Copy link
Collaborator

Banaanae commented Jan 3, 2025

some here too #316 (comment)
ill split all of these into their separate issues to making tracking easier

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

2 participants