Jump to content
Macro Express Forums

Launch Program and Activate Window does nothing


Recommended Posts

I have Acrobat Reader DC open on one monitor and PDF-XChange Viewer open on the other. I am trying to write a macro whereby Acrobat is selected and "right arrow" is transmitted to it to see the next page of the open document, then PDF X-Change Viewer is opened and "right arrow" is transmitted to it to see the next page of the open document there.

The first command is 'Launch Program and Activate Window: Program "ACRORD32.EXE", Parameters "", Window "[title of document]"' where I have the title of the document as it appears in the window title.

The second command is 'Text Type (Simulate Keystrokes): <ARROW RIGHT>'.

And so on.

When I composed the first command I selected one of two running processes called "ACRORD32.EXE". I don't know why there are two since I have only one instance of Acrobat Reader running. I suppose that is how Acrobat Reader works. Under the tab 'Options' I put the title of the document in the box 'Window Title', and "Partial Match" is selected.

The macro is activated by a hotkey. Or to be precise it is not activated by a hotkey since it does nothing. I do not know how to debug it since there is nothing to see.

How does Macro Express Pro deal with situations where there are two processes running with the same name?

I am running Windows 7 Home Premium.

Link to comment
Share on other sites

This is probably an instance of MDI WinForms. Years ago we had a huge discussion on the matter concerning MS Outlook. It's a daunting problem. I did manage to come up with a solution which I posted here but I don't remember it. A short time ago someone else had a similar problem and I told them the same thing. Dig up that old post of mine and the solution is in there. To be clear I don't know if that is your problem or not.

 

I suspect MEP is activating the hidden window.

 

What are the window titles? Can you get a unique bit of text from them?

 

Have you considered using a different PDF viewer?

 

You could use Alt+Tab to switch back and forth. I hate that approach but it's a thought. And arrow keys wouldn't be destructive in another app.

Link to comment
Share on other sites

Acrobat Reader DC is a troublesome program for anyone who needs an accessible application. After attempts to tame its problems via macros, I gave up. I uninstalled DC and installed a free, well-behaved PDF viewer, and have not looked back.

Which one do you use?

Link to comment
Share on other sites

And PDF is built into Windows 10. You can print to the built in PDF printer and the built in Edge browser and Internet Explorer are PDF viewers. Also Chrome. I use and old version of Acrobat to manipulate PDFs.

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

Yeah me too, I have no confiance on "wait %windows% to load", so I done it manualy for each macro and it works perfectly :

 

<REPEAT UNTIL Variable="%fenetre_active%" Condition="\x00" Value="Notepad"/>
<WINDOW ACTIVATE Title="Notepad" Exact_Match="TRUE" Wildcards="FALSE" _IGNORE="0x0006"/>
<VARIABLE SET STRING Option="\x05" Destination="%fenetre_active%"/>
<DELAY Flags="\x02" Time="500"/>
<END REPEAT/>
Link to comment
Share on other sites

Macro Express cannot "see" Acrobat Reader DC, at least not Version XI. So MEP macros cannot touch it.

 

DC XI is not accessible by keyboard, not even many of its menu items. The lack of keyboard access is symptomatic of the problem.

 

Macro Express does not cause the problem. The issue is with Adobe Reader. Submit a bug report with Adobe.

Link to comment
Share on other sites

Macro Express cannot "see" Acrobat Reader DC, at least not Version XI. So MEP macros cannot touch it. DC XI is not accessible by keyboard, not even many of its menu items. The lack of keyboard access is symptomatic of the problem.

Does running Macro Express As Administrator help?

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...
 Share

×
×
  • Create New...