Jump to content
Sign in to follow this  
Stoph

Activate Nth Matching Window?

Recommended Posts

Stoph

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
Stoph

I believe this is exactly the strategy I need.

Thanks

Share this post


Link to post
Share on other sites
Stoph

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)
EndIf
^- 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
Valik

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
Stoph

hmm

yea i figured out an alternate way to get it as i wanted

thanks for the help!

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.