samfisherirl / Easy-Auto-GUI-for-AHK-v2

Alguimist's 'Easy AutoGUI' GUI-Designer-Builder modified for Autohotkey v2.0, using mmikeww's AHKv2 converter
Other
248 stars 17 forks source link

ControlColor #2

Closed PavelDvorak closed 1 year ago

PavelDvorak commented 1 year ago

hello great tool, works great! thanks!!

i played with the options, an error appeared on the line starting ControlColor:

myGui := Gui()
myGui.Opt("+hWndhMainWnd")
ogchTxtOptions := myGui.Add("Text", "x8 y16 w190 h348 +0x200 +Border", "Options")
hTxtOptions := ogchTxtOptions.hwnd
ControlColor(hTxtOptions, hMainWnd, 0x76E7A6)

error upon execution:

Warning: This variable appears to never be assigned a value.
Specifically: global ControlColor
samfisherirl commented 1 year ago

hello great tool, works great! thanks!!

i played with the options, an error appeared on the line starting ControlColor:

myGui := Gui()
myGui.Opt("+hWndhMainWnd")
ogchTxtOptions := myGui.Add("Text", "x8 y16 w190 h348 +0x200 +Border", "Options")
hTxtOptions := ogchTxtOptions.hwnd
ControlColor(hTxtOptions, hMainWnd, 0x76E7A6)

error upon execution:

Warning: This variable appears to never be assigned a value.
Specifically: global ControlColor

I'm familiar with the issue from the original application. It requires the ControlColor.ahk file, found in the "required\convert" folder. From memory you need to Include this in your app.

I just looked over the file, I see it needs to be converted to ahkv2 and it appears to be fairly simple. For now, use the AHKv2 method backcolor https://www.autohotkey.com/docs/v2/lib/Gui.htm#BackColor

I'll see if I want to convert or make backcolor the primary method. Thanks for the heads up.

image

samfisherirl commented 1 year ago

@PavelDvorak can you provide the instance and steps you went through to get to this point

PavelDvorak commented 1 year ago

hello

  1. create a control in the preview window, for example Text control https://pasteboard.co/FIGP2SkAnZMI.png
  2. right click on it, choose "Properties"
  3. click on tab "Font", in the box "Control color", change background color, click on Apply/OK https://pasteboard.co/xtzHHZVzvyQX.png

A line starting with "ControlColor" is generated. https://pasteboard.co/TXIS8qBh6Ozs.png

samfisherirl commented 1 year ago

hello

  1. create a control in the preview window, for example Text control https://pasteboard.co/FIGP2SkAnZMI.png
  2. right click on it, choose "Properties"
  3. click on tab "Font", in the box "Control color", change background color, click on Apply/OK https://pasteboard.co/xtzHHZVzvyQX.png

A line starting with "ControlColor" is generated. https://pasteboard.co/TXIS8qBh6Ozs.png

put an update out a few hours ago fixing a lot of those issues. it actually caused a few errors, some if not all should be taken care of. download the new release and let me know if you have any issues. For now, Its just a patch to remove that function, Ill add a new one with ahkv2 classes for guicontrol color soon,.

edit: its in the solution

samfisherirl commented 1 year ago

hello great tool, works great! thanks!!

i played with the options, an error appeared on the line starting ControlColor:

myGui := Gui()
myGui.Opt("+hWndhMainWnd")
ogchTxtOptions := myGui.Add("Text", "x8 y16 w190 h348 +0x200 +Border", "Options")
hTxtOptions := ogchTxtOptions.hwnd
ControlColor(hTxtOptions, hMainWnd, 0x76E7A6)

error upon execution:

Warning: This variable appears to never be assigned a value.
Specifically: global ControlColor

Good news,

I finally got around to fixing Control Color, its not in Easy AutoGUI yet, but Ive posted just the ahkv2 version of ControlColor here https://github.com/samfisherirl/ControlColor.ahk-v2. Ill have it in the gui builder shortly.