If you have two compiled macros running on a single pc and both macros use the same variable names, will one of those programs be storing or overwriting the other macro's variables since each has identical variable names?
For example:
When notepad window opens, macro1 will GetWindowPos>notepad*,X,Y
at the same time while macro1 is still running, the user opens a second notepad and Macro2 will GetWindowPos>notepad*,X,Y
will the X and Y be overwritten?
I have tested this a few times with the above example and it is not overwriting them; however, I may be testing this incorrectly.
Is it possible to share variables between two different compiled macros?
Macro1 overwriting Macro2's variables?
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
No, definitely not.
Two macros (whether compiled or not) are completely independent of each other and variables are specific to each. Neither knows about the other. A variable called X in macro A will not be confused with a variable called X in macro B.
Two macros (whether compiled or not) are completely independent of each other and variables are specific to each. Neither knows about the other. A variable called X in macro A will not be confused with a variable called X in macro B.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?