I have a KM macro that performs a number of actions in one app (idoceo), then opens another app (MS Word) and ends, allowing me to edit text. Then I have another KM macro that saves and closes Word and brings the first app back to the front. I would like to be able to store the mouse location from the first KM macro (first app) in a variable, then when I return to that first app, restore the mouse location.
I can set up separate KM actions to do the two desired steps (store, restore), but they don't work as intended, possibly because KM treats the stored variable as a local variable that gets deleted when the action ends. I need to store that mouse location globally so that it can be subsequently used elsewhere in another macro.
Is that possible? Is there a way to store the mouse location somewhere in KM so it can be used in other KM macros?
Except they would, because the problem wasn't with them getting/setting the pointer position but with having that value persist so it could be used in a different macro.
You could post a pack of commonly used favourites that new users can download and install if you like. There's no real difference between a favourite and a "predefined action". However, I feel that the forum is an extension of the app, so for simple things like this, it's usually only a couple of minutes' work to make them yourself, and it's a good way to learn about the logic of variables etc. As you say, advantages and disadvantages.
Sorry for the long radio silence... end-of-semester madness here in Japan.
The solution turned out to be quite simple. Following Macdevign_mac's suggestion, I set a global variable for the mouse position in one macro. I could then restore that mouse position in another macro, and it works perfectly!
I agree with FrankB, it would have been easier if KM had a predefined action for mouse position, but then, as he also noted, I would never have 'met' all the helpful people in this forum.
As I get to know more about KM's incredible macro capabilities, I'm sure I'll be coming back for more help. Again, thanks, everyone!