View previous topic :: View next topic
|
Author |
Message |
Stef Van der Straeten
New User
Joined: 21 Apr 2022 Posts: 3 Location: Belgium
|
|
|
|
Good day,
I'm trying to find what exact color my variable has on screen.
Like this:
IF EX1MINC(J, I) = DFHRED THEN COMMT01O = 'RED';
But I can't find what the exact code should be in place of the 'DFHRED' to make this work.
Thanks in advance,
Stef. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Have you copied DFHBMSCA into your program? If not, add that and try again. DFHRED is defined in DFHBMSCA. |
|
Back to top |
|
|
Stef Van der Straeten
New User
Joined: 21 Apr 2022 Posts: 3 Location: Belgium
|
|
|
|
Thanks for your reply.
Yes, i have added %INCLUDE(DFHBMSCA);
I have been able to put the variables i want to be red, to DFHRED.
For the next part of my program, i have to be able to identify which of my variables are red and which are not.
Is [ IF EX1MINC(J, I) = DFHRED THEN ... ] normally supposed to work already if I included DFHBMSCA? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Is [ IF EX1MINC(J, I) = DFHRED THEN ... ] normally supposed to work already if I included DFHBMSCA? |
Yes, it should. What is the exact error message(s) you are getting? |
|
Back to top |
|
|
Stef Van der Straeten
New User
Joined: 21 Apr 2022 Posts: 3 Location: Belgium
|
|
|
|
No errors, the program just seems to skip the IF as if it isn't red.
Even a simple IF like IF EX1MINC(J, I) = DFHRED THEN COMMT01O = 'YES';
is getting skipped as if the text on screen isn't red. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
You're probably looking at the wrong variable, then. Colors are stored in the attribute byte of each field on the screen, so you'd need to be comparing the attribute byte (NOT the screen variable). |
|
Back to top |
|
|
|