Jump to content
Sign in to follow this  

Activate Nth Matching Window?

Recommended Posts

I need to know how to activate the nth matching window with winactivate.

The program I use has many windows which all match the same and I am trying to move through them quickly.

I have been trying to figure this out for a long time.

Share this post

Link to post
Share on other sites

This is the code I am having a problem with

(using that code Larry posted)

If Not StringLen($WinHandles) Then Return    ;NO "Graal" WINDOWS!!!
  $WinHandles = StringSplit(StringTrimRight($WinHandles),1),@LF)
^- Error here: EndIf no matching If statement

That's not even very important, new question:

how do i detect if a window is hidden/minimized or not?

say i want only windows that show up in the taskbar

Edited by Stoph

Share this post

Link to post
Share on other sites

You are using 1 line If syntax:

If <condition> Then <action>

But then there is an EndIf after you assing $WinHandles. I think you need to remove the Return, but I don't know what the logic for your script is. If you want to check and if there isn't anything in $WinHandles, assign something to it, use:

If Not StringLen($WinHandles) Then  $WinHandles = StringSplit(StringTrimRight($WinHandles),1),@LF)

Otherwise, just delete the EndIf statement.

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...