jaffy1229

Window does not focus with mouse click

14 posts in this topic

I am trying to create a macro to select different options in a VPN client, but when I tell the macro to click on the applications windows status bar to get focus, nothing happen. The macro should then select a pull down menu, but this fails also, because it appears the window is not active. When i manually click on the window, it becomes activated so I am not sure why this is happening.

 

It works fine on any other window, but this window seem to a be  a problem.  Does anyone know why this should be?

 

Thanks

Jaffy

Share this post


Link to post
Share on other sites

Macro Express may not be able to "see" anything in the VPN client. You might try activating the VPN window via Macro Express to give it focus, and then clicking a coordinate relative the window.

 

Also try activating the menus in the VPN by keyboard. You might be able to send keystrokes with Macro Express once the window is focused. Try <ALT> + the underlined letter to access a menu, e.g., Alt+F for the "File" menu.

 

If you cannot fully automate the process, partial automation is a fine option. For example, you may need to manually give focus to the VPN region before activating a macro that does the repetitive grunge work.

Share this post


Link to post
Share on other sites

Is your VPN client a UWP app or a WinAPI app? UWP are the new "apps" sometimes called "Metro apps". WinAPI are the traditional Windows programs.

Share this post


Link to post
Share on other sites
17 hours ago, acantor said:

Macro Express may not be able to "see" anything in the VPN client. You might try activating the VPN window via Macro Express to give it focus, and then clicking a coordinate relative the window.

 

Also try activating the menus in the VPN by keyboard. You might be able to send keystrokes with Macro Express once the window is focused. Try <ALT> + the underlined letter to access a menu, e.g., Alt+F for the "File" menu.

 

If you cannot fully automate the process, partial automation is a fine option. For example, you may need to manually give focus to the VPN region before activating a macro that does the repetitive grunge work.

I still can't gain focus on the window, I have tried the commands Window Show, Restore, Activate, but none give the window focus.

I will see if I can do as you suggest and manually give it focus before the macro and try not to loose its focus. Thanks

Share this post


Link to post
Share on other sites
3 hours ago, Cory said:

Is your VPN client a UWP app or a WinAPI app? UWP are the new "apps" sometimes called "Metro apps". WinAPI are the traditional Windows programs.

I am not sure, how would I find out?

Share this post


Link to post
Share on other sites

I have tried focussing the VPN client before the macro starts and have found Macro Express stops functioning. If i do not focus the VPN client, Macro Express moves the mouse to relevant positions, but nothing happens.

I am not sure why its doing this

Share this post


Link to post
Share on other sites

I have just tested another macro application and it has no problem with the VPN window. It takes focus of the window when it clicks on a pull down menu. So i have an issue with Macro Express, but not sure why

Share this post


Link to post
Share on other sites

Just to see if it helps would you try running Macro Express as administrator?

Share this post


Link to post
Share on other sites

I gave you links explaining each type of program Please read and understand them, at least the brief descriptor. UWP apps are the new Windows 10 apps. Like you find in the Window Store. They have the new modern look. For instance calculator as a UWP app looks like this whereas calculator as the old WinAPI app looks like this. MEP doesn't see controls in UWP apps. I assume you're talking about the client application to connect. 

Share this post


Link to post
Share on other sites

BTW you shouldn't run MEP through a VPN window. MEP needs to be running on the VPN client machine. The interaction is limited to blind text and mouse moves when running locally and is nearly useless and problematic. 

However I am not able to determine if you are talking about the VPN Client software connection dialog box or if you're trying to make MEP run on a client VPN machine though the VPN window. 

Share this post


Link to post
Share on other sites
On 08/03/2017 at 9:52 PM, Samrae said:

Just to see if it helps would you try running Macro Express as administrator?

it does helps, Thanks so much! I am already an administrator on the computer but it only seem to work when I run it as administrator. A bit strange, but at least it works. Thanks again.

Share this post


Link to post
Share on other sites
1 hour ago, jaffy1229 said:

it does helps, Thanks so much! I am already an administrator on the computer but it only seem to work when I run it as administrator. A bit strange, but at least it works.

For security purposes Windows (since Vista) does not allow a program running with normal privileges to interact with a program running with elevated privileges. This article describes how to run Macro Express as Administrator when Windows starts up: https://www.macros.com/faq/1.92.html

Share this post


Link to post
Share on other sites
On 10/03/2017 at 8:37 PM, Samrae said:

For security purposes Windows (since Vista) does not allow a program running with normal privileges to interact with a program running with elevated privileges. This article describes how to run Macro Express as Administrator when Windows starts up: https://www.macros.com/faq/1.92.html

Thanks again for your help:)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now