Jump to content

Recommended Posts

Posted

Hey!

I have succesfully created a script that automatically keeps focus on a certain window (and loops forever).

But while the script runs it seems Windows screensaver isnt activating.

Below my script:

While 1 = 1
   WinActivate ("[windowname]")
   WEnd

I'd like to know how to make a script that focuses the window only when screensaver is not running. And if screensaver is running it would focus screensaver.

I know that if I choose from the program I focus to "always on top" it will go over Windows screensaver, so I suspect the screensaver does run but the program window stays on top of it.

Or does my script prevent screensaver from running totally? I run it as an exe.

Posted (edited)

Thank you for your reply!

Does the If sentence work, if the program window has a changing title for example Program - Page X -> Program - Page Y

Or is there a wildcard I could use with WinActive (for example ("[windowname*]"))?

Sorry for being such a noob but I am a total noob with AutoIt :)

Edited by stounedi
Posted

Hmm, if I have two windows with same starting but other one has extra in the end, say:

Prog - c:xxxyyy

and

Prog

I could use Opt("WinTitleMatchMode",2)

Then:

WinActivate ("[Prog - ]")

It would work only for the window that has the extra ending, right?

And thank you very much for your help, again.

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...