AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

some inconsistencies

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Rubberduck



Joined: 24 Apr 2005
Posts: 96

PostPosted: Tue May 24, 2005 5:26 pm    Post subject: some inconsistencies Reply with quote

@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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Wed May 25, 2005 1:04 am    Post subject: Re: some inconsistencies Reply with quote

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
View user's profile Send private message Send e-mail
Rubberduck



Joined: 24 Apr 2005
Posts: 96

PostPosted: Wed May 25, 2005 5:04 pm    Post subject: Reply with quote

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. Embarassed
_________________
Wer keine Antworten hat muss nicht dumm sein,
dumm ist nur der welcher keine Fragen hat.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Wed May 25, 2005 9:07 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group