Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

Gaining focus of a window without the complete name

$
0
0
I've been searching online and experimenting but can't get this to work.

I'm using the Windows Scripting Host (just running .vbs files on the machine)

What I need to do is gain focus on a particular window. For instance, "1293729 - Details - Windows Internet Explorer" where the number at the beginning changes. If the number was at the end then I know AppActivate can do it on it's own, but if I try to AppActivate " - Details - Windows Internet Explorer" then I get nothing.

Is there a method I could use to focus on that window? As a side note, there will only be one window at any time that matches that format.

I'm thinking maybe along the lines of looping through all window titles (if that's possible) until you find one that matches, and then pass it to AppActivate, but I'm new to the Windows API and I'm not sure where I should look.

Thanks

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>