Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
PepsiHog
- Automation Wizard
- Posts: 517
- Joined: Wed Apr 08, 2009 4:19 pm
- Location: Florida
Post
by PepsiHog » Sat Oct 02, 2021 12:41 am
Hello,
I have an edit box where I set the font to be silver. Now I'd like to do the same programmatically. But for the life of me, can't seem to figure how.
What I have sets the font to black.
Code: Select all
let>Color={if(%Col%>0,255,0)}
SetDialogProperty>Dialog1,%EditText1%,Text,%Col%
SetDialogObjectFont>Dialog1,%EditText1%,MS Sans Serif,8,Western,%Color%
Forget all the rest. The first line sets the color value to red(255) or black(zero). I want black to be silver. What's the magic number?
Sure would appreciate any help.
Thanks,
PepsiHog
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
-
JRL
- Automation Wizard
- Posts: 3530
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Mon Oct 04, 2021 12:34 am
Use the editor's coordinates combobox and set the box to also include the pixel color. Then set a font to silver and hover over it with the mouse. The number should appear. I get 12632256.
-
Grovkillen
- Automation Wizard
- Posts: 1132
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
-
Contact:
Post
by Grovkillen » Mon Oct 04, 2021 9:36 am
If you know the RGB then use the RGB> command.
You can also get the HEX value from this:
Code: Select all
RGB>176,196,222,RGB_to_Integer
Format>%x,RGB_to_Integer,Integer_to_hex
The HEX is reversed though, just a word of warning.
-
PepsiHog
- Automation Wizard
- Posts: 517
- Joined: Wed Apr 08, 2009 4:19 pm
- Location: Florida
Post
by PepsiHog » Mon Oct 04, 2021 7:27 pm
@JRL,
Thanks. Thanks to you posting the number, I did not need to mess with it.

And that's not to say I'm lazy. I already spent time on it. It's one of those distractions in a macro that makes no difference, but you do it anyway.
@Grovkillen,
Thanks for the help.
PepsiHog
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!