Jump to content
Macro Express Forums

can ME open a second file on opening the first one ?


poetman

Recommended Posts

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

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...