Upfront, I am sorry to ask this question. I did review the Wiki and a number KMF posts and I cannot see the answer to this question which is fundamental knowledge to all you guys but not to me.
What I can never remember is how to actually enter variables, tokens and functions into KM actions. Every time it has been a frustrating trial and error process.
Specifically, which actions require:
Variables in the format of: %Variable%Var10% vs %Var10% vs Var10
Tokens: %Token%LongDate% vs %LongDate% vs LongDate
Functions: WINDOWCOUNT() vs %WINDOWCOUNT()%
Reading a forum post, I think the answer to this is that the only way to use a function is to first SET VARIABLE TO CALCULATION and in the "to" field in that action use WINDOWCOUNT() instead of %WINDOWCOUNT()% I know this works but am I correct with the "the only way to use a function in an action is..." part?
Can tokens be inserted straight into an action which requires a number or array from a token or tokens also cannot be inserted themselves into an action and they have to be used like functions (assign to variable first)?
Is the answer "depends"? Where there are a class of actions which require the "assign to variable first" and another class of actions which will accept a function or token directly? If yes, how do I tell the difference?
Finally, I cannot figure out the .left or .top type of parameters of a variable created from a function. Example: SET VARIABLE Coords to CALCULATION WINDOW() and then I want the Left parameter from the variable Coords, I cannot figure out if I use:
SET VARIABLE WinLeft to Text %Variable%Coords.left% or some other %xxx% formatting.
How to use it in an IF Coords.left is 100 THEN context?
Is it IF %Variable%Coords.left% is 100 OR IF Coords.left is 100 or something else?
Of course I can figure this out by trial and error but that takes time every time and I can't remember which one worked the next time I need to use it. If I just understood the logic, I will know which one to use. This is not from lack of trying, for example, I cannot find anywhere (>20 mins of searching) in the Wiki where there is an example of an action that accomplishes the parameter extraction of: SET Variable TO Var10.left
Thank you in advance for the newbie sounding question. (Kind of embarrassed to ask this after months of using KM daily and creating about 100, somewhat complex (>20 actions each) macros with a fair bit of AppleScript calls, all of which work well.)
Alex