Jump to content

close a Window *it is not so easy like it sounds*


nbg15
 Share

Recommended Posts

Hello everbody...

 

since hours i am trying to close a window *but title changes every time*


Opt( "WinTitleMatchMode", 2 )
WinClose("part of title")

 

this works fine for some "normal" windows but this window is different...

----> i can get the handle but also the handle changes every time...

so my last idea is to close the window by the size *because the window has every time the same size*

but how can I close a window by a special size??

Thanks for all your hints and help...

bye


Alex

 

Link to comment
Share on other sites

  • Moderators

What is the application? Can you give a screenshot example of what the window looks like? Even if the title changes, is there text in the window that is consistent?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Do you know the process name?  Perhaps this will aide.

edit: just tested this.  I think WinList might have changed iat some point.  Providing "" to WinList only returns the active window.  Change the line

$wins = WinList($winTitle)

to
 

$wins = WinList()

to return all windows

Edited by spudw2k
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...