Jump to content

WinActive question


member
 Share

Recommended Posts

hello

WinActive is a command for windows

is there a command similar to WinActive for context menus?

in other words, to check whether a context (right click) menu is active

thanks

PS: I want to autochoose a context menu entry automatically when a context menu appears

Link to comment
Share on other sites

Good question - context menus don't seem to show up as a visible window in the WinList script from the help file - but they are "seen" by the Pixel... functions like PixelGetColor. You would have to check an offset from the mouse position and in all four quadrants that the context menu could appear in (unless you know that it will always be in the same place relative to your rightclick.)

Anyone else have any thoughts on this one?

While 1
    $pos = MouseGetPos()
    $x = $pos[0] + 30
    $y = $pos[1] - 30
    ToolTip(PixelGetColor($x, $y), $x, $y)
    Sleep(99)
WEnd

[size="1"][font="Arial"].[u].[/u][/font][/size]

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

  • Recently Browsing   0 members

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