“Highlight Screen Area" using Variables

I'm sure I'm missing something very basic here.
How do I use the stored variables in the highlight step.
I don't know which format to use, and neither of these two worked. ??

Screen Area Setting Variables Testing.kmmacros (6.4 KB)

I was just involved in a topic similar to this. Check out the macro I posted:

Let me know if you have questions.

Yes, I was involved in that chat. but I need to store the whole line of text for the WINDOW command, not just part of it. it seems there’s something in the lines that are getting in the way. Can you get my macro to work? Recalling the variable for the complete line of code for each dimension?

Oh, sorry, I thought it was strange to have such a similar question! :blush:

Try this:

Nice, working now, so what did that ‘calculate’ filter do? I would never have know to do that! I guess time and experience.

Filter is hard to explain. Look at this filter with a different option, which is a little more obvious:

It takes the value inside the variable, and capitalizes it.

So, back to this one:

It takes the value inside the variable, and does a "Calculate" on it.

Does that help?

1 Like

Your original macro was never calculating the value of the expression.

You were using text like “WINDOW(0,Left)+24” and trying to use that as a coordinate, but that is text and not a number so it does not work.

The Filter: Calculate is taking the text in the variable and calculating the result and storing it back into the variable which now is a simple number and can be used in the action later on.

1 Like