 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Rubberduck
Joined: 24 Apr 2005 Posts: 96
|
Posted: Tue May 24, 2005 5:26 pm Post subject: some inconsistencies |
|
|
@Chris: Test the script. Further details are shown by the script itself.
| Code: |
Gui, Add, Button, x6 y50 w100 h20 gColBut, cAqua
Gui, Add, Button, x+ w100 h20 gColBut, c00FFFF
Gui, Add, Button, x+ w100 h20 gColBut, Aqua
Gui, Add, Button, x+ w100 h20 gColBut, 00FFFF
Gui, Add, Button, x6 y+ w100 h20 gColBut, cRed
Gui, Add, Button, x+ w100 h20 gColBut, cFF0000
Gui, Add, Button, x+ w100 h20 gColBut, Red
Gui, Add, Button, x+ w100 h20 gColBut, FF0000
Gui, Add, Button, x6 y+ w100 h20 gColBut, cGreen
Gui, Add, Button, x+ w100 h20 gColBut, c008000
Gui, Add, Button, x+ w100 h20 gColBut, Green
Gui, Add, Button, x+ w100 h20 gColBut, 008000
Gui, Add, Button, x6 y+ w400 h20 gColBut, Default
Gui, Add, Edit, x6 y+10 w400 r23,
(
Test-Script for GUI, COLOR
The third and fourth button in each row are working as awaited,
according to the AHK-HelpFile.
The second button also works, but using a C-Colorname for
the "GUI-COLOR-Command" is NOT mentioned in the AHK-Help.
At least the Help-File should be updated
The first buttons does not change the color (at least not as
awaited), but if c008000 works (not mentioned in the
Helpfile), then also cGreen should work to make things more
consistent. This also would be better, because
cRed, cGreen....... are also used in the "GUI-FONT-Command".
So a average User may think this also works for
the "GUI-Color-Command".
@Chris. cRed and cGreen change the color to 0C0000 (???), but
CAqua change the color to CA0000 (???). This is somewhat
inconsistent. If you don't want c-colorname to be allowed
for GUI-COLOR-Command (this is current status in the
AHK-Help), then using a c-Colorname should do simply
NOTHING (leave color as it is) or do the RIGHT thing.
)
Gui, Show, ,test
return
|
_________________ Wer keine Antworten hat muss nicht dumm sein,
dumm ist nur der welcher keine Fragen hat. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Wed May 25, 2005 1:04 am Post subject: Re: some inconsistencies |
|
|
Your script seems to be missing the ColBut label. However, I think I get your point.
Upon review, I don't think the "c" prefix can be supported for "Gui Color" because it would introduce ambiguity and break existing scripts. This is because the letter C is a valid hexadecimal digit and it seems impossible to detect when it is being used as a prefix and when it is an actual part of the color number. |
|
| Back to top |
|
 |
Rubberduck
Joined: 24 Apr 2005 Posts: 96
|
Posted: Wed May 25, 2005 5:04 pm Post subject: |
|
|
Sorry for the missing ColButt-Label (some copy-paste-error)
I tried to re-program it, but failed.
I vague remember that I use a command that returned me the
active control of the GUI.
Then I used a line to get the Button-Text of this active button.
The third line used this text for GUI, COLOR....
Believe it or not, I don't remember how I did it.
Can you help we this:
1: How do I get the active control of a Gui
2: How do I get the Text of this Control ?
I really feel silly, because I simply forgot how I did it YESTERDAY.  _________________ Wer keine Antworten hat muss nicht dumm sein,
dumm ist nur der welcher keine Fragen hat. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Wed May 25, 2005 9:07 pm Post subject: |
|
|
| Rubberduck wrote: | | 1: How do I get the active control of a Gui | GuiControlGet, OutputVar, Focus
| Quote: | | 2: How do I get the Text of this Control ? |
It depends on the control type, but for something like an Edit control or DropDownList, you can use:
GuiControlGet, ControlVarName |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|