Jump to content

Recommended Posts

Posted (edited)

I thought this would be a simple WinActivate, but it's not turning out that way:  WinActivate("[CLASS:MozillaWindowClass]", "") returns a window handle.

When I use that handle to check the state of the browser window, it comes back as 15:

$WIN_STATE_EXISTS (1) = Window exists
$WIN_STATE_VISIBLE (2) = Window is visible
$WIN_STATE_ENABLED (4) = Window is enabled
$WIN_STATE_ACTIVE (8) = Window is active

... only it's not displayed. But if I request an active notepad window, instead, notepad pops into view.

Does anyone know why a browser window would be treated differently?

Thanks in advance for any help.

Edited by qwert
Posted
Quote

Change a window's "Always On Top" attribute.

Thanks for your response. I guess I should have included some of the things I've tried ... that being one of them ... although I wasn't comfortable with the idea of changing a window attribute. I've also tried WinMove and a couple of other things from the 25+ threads I've read on calling for a window to display.

I guess I'm hoping to hear a method that someone has used that works. Otherwise, there are a lot of possibilities of things to try. (I actually started with a PID lookup method that got very complicated.) I only focused on using the Class: identifier because it gave me results in the most instances.

 

Posted

Well, I did notice that the handle it returns doesn't match the one that the info utility displays. I figured it had something to do with having 20 browser tabs open.

Any suggestion on how to confirm "correct one"?

 

5bb4ff51a82f5_WindowInfo.PNG.ecb0d6f0b8a947ba3872666fd8e52b8f.PNG

Posted

It's certainly not minimized by any user minimize action. Yes, other windows have been opened that are on top of it ... like the SciTE window I'm running ... but if I click the browser's taskbar entry, it comes to the top ... which is exactly how one expects taskbar entries to behave. Yet, any script command to display the browser is ignored.

Posted

I found a bit of a clue on the web:

Quote

WinActivate works great to bring the browser to the front if the title I am looking for is the current tab the user is on.
However, if the user has multiple tabs open and the one I am looking for is not the current tab, the the browser is never brought forward.

Unless that jogs someone's memory, I'll start looking at WinGetTitle for a possible way.

Posted

And it does for me, as well!

EnumWindowsTop

That's a feature I've never had occasion to use ... but I see how it fits the bill.

Thanks for sticking with this. I appreciate your help.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...