The expression looks incorrect. You should not be write something like size= in here. Instead you should be selecting the size variable when configuring the action and then setting it to the value in the expression (only the desired value should be written in the expression box).
Not sure I understand what you mean. I'll try to explain my points as best as I can.
- When I create the "set variable" action, I select my integer local variable I want to set, then click on "expression" and the 3 dots for the magic text. If I select the "dictionary/array size" it only shows my local dictionaries/arrays. Why it doesn't show global ones?
- Let's say I select a local dictionary, in the text field I will see
{size=dict-local[example-key]}. dict-local[example-key] is also a dictionary.
- but since I want to use a global dictionary, I will manually replace the text with
{size=dict-global[example-key]}. And this still works.
- last step is that I want the key of the dictionary to be the value of a variable. If I use the three dots magic text, in the menu I can't see any string variable (I suppose it's because I'm setting an integer variable), so I'll write it manually and my expression becomes
{size=dict-global[{lv=local-key}]}. This works, the OK button is enabled and the macro works.
- but it's not over yet, because I want the key to be the value of a string GLOBAL variable. As usual I can't use the magic text menu so I'll write the expression like this
{size=dict-global[{v=global-key}]}. Values of local-key is the same as global-key, but this expression is not accepted and I can't press the OK button as shown in the first post in this topic.
I hope this explanation helps. Let me know what you think.
Thanks