poetman Posted May 24, 2013 Report Share Posted May 24, 2013 Hi to evryone. recently I tried to make a little macro, but it keeps biting its own tail This is what I want to achieve: I've got a couple of files, let's say A, B, C etc. And every file has an adherent file, let's say a, b, c. When opening the A file, I'd liked the a file to be opened automaticly too. (the A file-window and the a file- window appear next to eachother) When messing around with A, B, and C, I want on changing the focus of the motherfile, the focus of the childfile to change along. So I made this little macro: macro activation is: Window Title (for example the title of the openened A file-window) macro command is: Program Launch >> path of the a file (I couldn't find a File Launch command) This does the job, A and a, B and b appear every time in a pair, as wanted, but..... working with the A a pair, I can't get the focus back to the A window, because immediately the focus goes to the childwindow a. And the only way to close A is using the Windows taskmanager. It's a nice confusing puzzle. Thanks in advance for any hint, suggestion or answer Poetman Quote Link to comment Share on other sites More sharing options...
Samrae Posted May 24, 2013 Report Share Posted May 24, 2013 You could get the title of the window with focus (A, B, or C) before opening a, b or c. Then, after opening a, b or c activate the saved window title. Quote Link to comment Share on other sites More sharing options...
poetman Posted May 25, 2013 Author Report Share Posted May 25, 2013 Thanks Samrae, for helping me. I'm afraid it's not working for me, yet I tried several commands: Set Window Order, and Activate Window, but the point is that the moment the A-window gets the focus the macro will run again and load the a-window, and set focus to it. I discovered some sort of workaround though: when I dubbleclick twice in the A-window I seem to be able to overrule the restarting of the macro, and be able to enter the A-window. I wonder if it would be possible to work with a variable ? I tried with the Get Variable filename command, but then I don't know in which command to place the retrieved varable. Any other thoughts ? Poetman Quote Link to comment Share on other sites More sharing options...
Samrae Posted May 28, 2013 Report Share Posted May 28, 2013 There are commands that enable and disable a macro. A disabled macro will still run it just won't be activated again. Would it work to have macro A launch, disable itself, launch macro a, and either enable itself before finishing or have a process that later enables macro A? Maybe something like this: // This is macro A Macro Disable: A Variable Set String %T9% from Window Title // Do some stuff Macro Run: a // Do more stuff Macro Enable: A Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.