SetDialogObjectFont anomaly
Moderators: JRL, Dorian (MJT support)
SetDialogObjectFont anomaly
Running Win XP sp2 and Macro Scheduler 11.1.04
This script displays a dialog. Clicking the checkbox in the dialog should make all text in the dialog switch from red to green.
On my desktop computer running this script and clicking the checkbox changes all the colors from red to green to red to etc. I've tried this on two relatively new Dell laptops and not all of the colors change. All of the sizes are set to the larger font but the colors of the button the checkbox and the radiogroup all stay black. I'm wondering if anyone else has any issues running the script? And whether anyone has any ideas why the laptops are color challenged?
Thanks,
Dick
[code]
Dialog>Dialog1
Caption=Color Change Test
Width=539
Height=312
Top=CENTER
Left=CENTER
Label=Part Number:,32,16,true
Label=Revision:,32,48,true
CheckBox=msCheckBox1,Change Color,27,87,118,True
Button=BLUEPRINTS,24,131,262,40,3
Edit=msEdit1,29,181,121,TEST
Memo=msMemo1,158,12,185,89,TEST
ListBox=msListBox1,359,11,121,97,Item1%CRLF%Item2
ComboBox=msComboBox1,358,115,145,Item1%CRLF%Item2
RadioGroup=msRadioGroup1,Test,329,148,185,105,Item1%CRLF%Item2,-1
EndDialog>Dialog1
SetDialogObjectColor>Dialog1,,16777215
Let>Blue=16744576
Let>Green=5878528
Let>Red=128
Let>ccflag=1
SetDialogObjectFont>dialog1,mslabel1,Arial,12,1,red
SetDialogObjectFont>dialog1,mslabel2,Arial,12,1,red
SetDialogObjectFont>dialog1,msbutton1,Arial,24,1,red
SetDialogObjectFont>dialog1,msCheckBox1,Arial,12,1,red
SetDialogObjectFont>dialog1,msEdit1,Arial,12,1,red
SetDialogObjectFont>dialog1,msMemo1,Arial,12,1,red
SetDialogObjectFont>dialog1,msListBox1,Arial,12,1,red
SetDialogObjectFont>dialog1,msComboBox1,Arial,12,1,red
SetDialogObjectFont>dialog1,msRadioGroup1,Arial,12,1,red
Show>dialog1
Label>Loop
GetDialogAction>dialog1,res1
If>res1=2
Exit>0
EndIf
If>res1=3
ResetDialogAction>dialog1
mdl>OK
EndIf
If>{(%dialog1.mscheckbox1%="True") and (%ccflag%=1)}
SetDialogObjectFont>dialog1,mslabel1,Arial,12,1,red
SetDialogObjectFont>dialog1,mslabel2,Arial,12,1,red
SetDialogObjectFont>dialog1,msbutton1,Arial,24,1,red
SetDialogObjectFont>dialog1,msCheckBox1,Arial,12,1,red
SetDialogObjectFont>dialog1,msEdit1,Arial,12,1,red
SetDialogObjectFont>dialog1,msMemo1,Arial,12,1,red
SetDialogObjectFont>dialog1,msListBox1,Arial,12,1,red
SetDialogObjectFont>dialog1,msComboBox1,Arial,12,1,red
SetDialogObjectFont>dialog1,msRadioGroup1,Arial,12,1,red
Let>ccflag=2
EndIf
If>{(%dialog1.mscheckbox1%="False") and (%ccflag%=2)}
SetDialogObjectFont>dialog1,mslabel1,Arial,12,1,green
SetDialogObjectFont>dialog1,mslabel2,Arial,12,1,green
SetDialogObjectFont>dialog1,msbutton1,Arial,24,1,green
SetDialogObjectFont>dialog1,msCheckBox1,Arial,12,1,green
SetDialogObjectFont>dialog1,msEdit1,Arial,12,1,green
SetDialogObjectFont>dialog1,msMemo1,Arial,12,1,green
SetDialogObjectFont>dialog1,msListBox1,Arial,12,1,green
SetDialogObjectFont>dialog1,msComboBox1,Arial,12,1,green
SetDialogObjectFont>dialog1,msRadioGroup1,Arial,12,1,green
Let>ccflag=1
EndIf
Goto>Loop
[/code]
This script displays a dialog. Clicking the checkbox in the dialog should make all text in the dialog switch from red to green.
On my desktop computer running this script and clicking the checkbox changes all the colors from red to green to red to etc. I've tried this on two relatively new Dell laptops and not all of the colors change. All of the sizes are set to the larger font but the colors of the button the checkbox and the radiogroup all stay black. I'm wondering if anyone else has any issues running the script? And whether anyone has any ideas why the laptops are color challenged?
Thanks,
Dick
[code]
Dialog>Dialog1
Caption=Color Change Test
Width=539
Height=312
Top=CENTER
Left=CENTER
Label=Part Number:,32,16,true
Label=Revision:,32,48,true
CheckBox=msCheckBox1,Change Color,27,87,118,True
Button=BLUEPRINTS,24,131,262,40,3
Edit=msEdit1,29,181,121,TEST
Memo=msMemo1,158,12,185,89,TEST
ListBox=msListBox1,359,11,121,97,Item1%CRLF%Item2
ComboBox=msComboBox1,358,115,145,Item1%CRLF%Item2
RadioGroup=msRadioGroup1,Test,329,148,185,105,Item1%CRLF%Item2,-1
EndDialog>Dialog1
SetDialogObjectColor>Dialog1,,16777215
Let>Blue=16744576
Let>Green=5878528
Let>Red=128
Let>ccflag=1
SetDialogObjectFont>dialog1,mslabel1,Arial,12,1,red
SetDialogObjectFont>dialog1,mslabel2,Arial,12,1,red
SetDialogObjectFont>dialog1,msbutton1,Arial,24,1,red
SetDialogObjectFont>dialog1,msCheckBox1,Arial,12,1,red
SetDialogObjectFont>dialog1,msEdit1,Arial,12,1,red
SetDialogObjectFont>dialog1,msMemo1,Arial,12,1,red
SetDialogObjectFont>dialog1,msListBox1,Arial,12,1,red
SetDialogObjectFont>dialog1,msComboBox1,Arial,12,1,red
SetDialogObjectFont>dialog1,msRadioGroup1,Arial,12,1,red
Show>dialog1
Label>Loop
GetDialogAction>dialog1,res1
If>res1=2
Exit>0
EndIf
If>res1=3
ResetDialogAction>dialog1
mdl>OK
EndIf
If>{(%dialog1.mscheckbox1%="True") and (%ccflag%=1)}
SetDialogObjectFont>dialog1,mslabel1,Arial,12,1,red
SetDialogObjectFont>dialog1,mslabel2,Arial,12,1,red
SetDialogObjectFont>dialog1,msbutton1,Arial,24,1,red
SetDialogObjectFont>dialog1,msCheckBox1,Arial,12,1,red
SetDialogObjectFont>dialog1,msEdit1,Arial,12,1,red
SetDialogObjectFont>dialog1,msMemo1,Arial,12,1,red
SetDialogObjectFont>dialog1,msListBox1,Arial,12,1,red
SetDialogObjectFont>dialog1,msComboBox1,Arial,12,1,red
SetDialogObjectFont>dialog1,msRadioGroup1,Arial,12,1,red
Let>ccflag=2
EndIf
If>{(%dialog1.mscheckbox1%="False") and (%ccflag%=2)}
SetDialogObjectFont>dialog1,mslabel1,Arial,12,1,green
SetDialogObjectFont>dialog1,mslabel2,Arial,12,1,green
SetDialogObjectFont>dialog1,msbutton1,Arial,24,1,green
SetDialogObjectFont>dialog1,msCheckBox1,Arial,12,1,green
SetDialogObjectFont>dialog1,msEdit1,Arial,12,1,green
SetDialogObjectFont>dialog1,msMemo1,Arial,12,1,green
SetDialogObjectFont>dialog1,msListBox1,Arial,12,1,green
SetDialogObjectFont>dialog1,msComboBox1,Arial,12,1,green
SetDialogObjectFont>dialog1,msRadioGroup1,Arial,12,1,green
Let>ccflag=1
EndIf
Goto>Loop
[/code]
Hi JRL,
Running Win XP SP3 and Macro Scheduler 11.1.04 here.
The following text strings on the dialog do not change for me:
Change Colo (by the checkbox)
BLUEPRINTS
Test (the group name of the radio buttons)
Item 1 (next to the radio button)
Item 2 (next to the radio button)
This is an older desktop (Pentium 4 - 3 GHz) not a laptop.
Running Win XP SP3 and Macro Scheduler 11.1.04 here.
The following text strings on the dialog do not change for me:
Change Colo (by the checkbox)
BLUEPRINTS
Test (the group name of the radio buttons)
Item 1 (next to the radio button)
Item 2 (next to the radio button)
This is an older desktop (Pentium 4 - 3 GHz) not a laptop.
Last edited by jpuziano on Fri Feb 20, 2009 5:15 am, edited 1 time in total.
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -

Hi JRL,
Not a problem, glad to help.
I just tried it on my home computer where I'm running Macro Scheduler Pro Ver 11.1.04 on XP Professional Version 2002 SP3.
It fails here in exactly the same way as it did on my work computer and evidently your laptops... those same items did not change color.
Could it be possible it works correctly with SP2 but not with SP3? What exactly is your home computer running JRL?
I'll do a Windows Update to get all the latest patches from Microsoft and try it again... and if its any different I'll post but I'm guessing it won't change.
Marcus can you replicate this problem on XP SP3?
Not a problem, glad to help.
I just tried it on my home computer where I'm running Macro Scheduler Pro Ver 11.1.04 on XP Professional Version 2002 SP3.
It fails here in exactly the same way as it did on my work computer and evidently your laptops... those same items did not change color.
Could it be possible it works correctly with SP2 but not with SP3? What exactly is your home computer running JRL?
I'll do a Windows Update to get all the latest patches from Microsoft and try it again... and if its any different I'll post but I'm guessing it won't change.
Marcus can you replicate this problem on XP SP3?
Last edited by jpuziano on Fri Feb 20, 2009 5:14 am, edited 1 time in total.
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -

- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Thanks for the input Bob and Jpuziano
The work computer where it all displays correctly is XP pro sp3 but it started out as a pre-service pack XP installation.
The Home computer where it also all displays correctly is XP pro sp1.
The two Dell laptops that display incorrectly are a little over a month old and are both XP pro sp3. IF it matters they were purchased at the same time and are configured identically.
Another thought is that the work and home computers that display correctly each started on version 7.0 of Macro Scheduler and have had nearly every version build installed on them. The two laptops have only ever seen version 11.
The work computer where it all displays correctly is XP pro sp3 but it started out as a pre-service pack XP installation.
The Home computer where it also all displays correctly is XP pro sp1.
The two Dell laptops that display incorrectly are a little over a month old and are both XP pro sp3. IF it matters they were purchased at the same time and are configured identically.
Another thought is that the work and home computers that display correctly each started on version 7.0 of Macro Scheduler and have had nearly every version build installed on them. The two laptops have only ever seen version 11.
I was right, even the latest patches from Microsoft did not help, still fails.jpuziano wrote:I'll do a Windows Update to get all the latest patches from Microsoft and try it again... and if its any different I'll post but I'm guessing it won't change.
Marcus can you replicate this problem on XP SP3?
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -

- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Yes, I've noticed. His last forum post was on the 16th though he did Blog yesterday. I also hope all is Ok.Has anyone besides me noticed that Marcus has been unusually absent for the past few days? Hope all is OK.
As a test I compiled this script and found that the compiled version behaves the same as the script. Another thing I noticed is that the computers the object colors are failing on have Microsoft .NET installed. The computers that the object colors work correctly on do not.
Does this script display object colors correctly for anyone else?
Interesting... Perhaps .NET installs a different version of a DLL that is causing the problem.JRL wrote:Another thing I noticed is that the computers the object colors are failing on have Microsoft .NET installed. The computers that the object colors work correctly on do not.
Do you have a PC where you can test the macro, install .NET then test again?
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -

Ok... I have a discovery to report. The difference between seeing all objects in color and not seeing all objects in color in Windows XP seems to be the difference between "Windows XP Style" and "Windows Classic Style". If it is not the definitive difference, at least on my computers I can turn it on and off by changing from one style to the other.
To test for yourself. Go to "Display Properties" and select the "Appearance" tab. Under "Windows and Buttons" select "Windows Classic Style" and the above script should display all of the dialog objects in color. Select "Windows XP Style" and the checkbox, the button and the radiogroup will be plain black.
Could those of you who have been kind enough to test this previously, try the setting "Windows Classic Style" and report back to the forum your findings?
Thank you
Dick
To test for yourself. Go to "Display Properties" and select the "Appearance" tab. Under "Windows and Buttons" select "Windows Classic Style" and the above script should display all of the dialog objects in color. Select "Windows XP Style" and the checkbox, the button and the radiogroup will be plain black.
Could those of you who have been kind enough to test this previously, try the setting "Windows Classic Style" and report back to the forum your findings?
Thank you
Dick
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Hi JRL,
I confirm your findings. Under "Windows and buttons", mine was set to "Media Center style" and I was seeing some black text as described earlier. When I changed the setting to "Windows Classic Style" then the macro flipped all text colors between red and green as intended. When I filpped it back again to "Media Center style", it failed as before.
Question 1: Could the code behind the SetDialogObjectFont> command be changed so as to not be dependant on this Windows setting?
Question 2: If #1 is not possible, could you please add a warning to the Help File? Under the SetDialogObjectFont> command, it should say that unless this Windows setting is "Windows Classic Style", the chosen text color may not be displayed.
Question 3: Does anyone have the code required to programatically determine the setting? No doubt its in the registry somewhere. If we had this, we could use it in a macro... and if the setting was "Windows Classic Style"... proceed... but if it wasn't, popup a warning to the user informing them that text colors on dialogs may be wrong and not to rely on them... or even suggesting they go and change the setting in Windows... if they want to see the intended dialog text colors.
I confirm your findings. Under "Windows and buttons", mine was set to "Media Center style" and I was seeing some black text as described earlier. When I changed the setting to "Windows Classic Style" then the macro flipped all text colors between red and green as intended. When I filpped it back again to "Media Center style", it failed as before.
- Problem: In XP, for the SetDialogObjectFont> command, the text colors chosen will only be displayed correctly if the PC is set to: Display Properties/Appearance/Windows and buttons/"Windows Classic Style"
Other settings like "Media Center style" or "Windows XP Style" may result in different colors being displayed for some dialog text (probably black).
Question 1: Could the code behind the SetDialogObjectFont> command be changed so as to not be dependant on this Windows setting?
Question 2: If #1 is not possible, could you please add a warning to the Help File? Under the SetDialogObjectFont> command, it should say that unless this Windows setting is "Windows Classic Style", the chosen text color may not be displayed.
Question 3: Does anyone have the code required to programatically determine the setting? No doubt its in the registry somewhere. If we had this, we could use it in a macro... and if the setting was "Windows Classic Style"... proceed... but if it wasn't, popup a warning to the user informing them that text colors on dialogs may be wrong and not to rely on them... or even suggesting they go and change the setting in Windows... if they want to see the intended dialog text colors.
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
