I know that Local and Instance variables get deleted after the macro runs, whereas Global don't.
I was reading this topic and I understand what happens when a global variable is empty (it gets deleted) or when we use %Delete%.
It seems that using %Delete% keeps the variable, but it's empty?
Can someone explain what is the logic behind this, if we can't see it in the list?
Why does an empty variable get deleted, but using %Delete% keeps the variable, but hidden? Shouldn't this be the opposite?
Now my question is:
I have a global variable where I will be adding new lines over time. At some point, I want to grab all that info and send it to the clipboard. When I do that, I want to clear the variable, because next time I add new lines, I don't want to append, I want to add new lines from scratch.
I could use a prompt to decide what to do such as replace the current info or append (for example the first time I would pick Replace, then after that I would pick Append), but I would like it to be simpler and avoid me thinking what I need to do, clicking more buttons, etc.
Here's how the current behavior can be tricky:
Let's say I have Macro 1 and it has an action that creates a global macro "test" (let's assume that a local variable isn't that the macro needs).
If I then empty it or use %Delete% that variable will not be visible on the list.
Now if I'm working on Macro 2 and I want to know if a particular global variable is available by going to the list of variables and I forgot about Macro 1, I could make the mistake of using "test" again on Macro 2, so if I'm appending lines using Macro 2, when I run Macro 1 it will break things.
I think empty global variables should stay visible and %Delete% should do what it says: delete the variable from the list. I honestly don't understand the reasoning behind the current behavior and why it needs to be confusing?