binggie

how to winactivate program that change title all the time?

4 posts in this topic

I want to winactivate program and minimize it and then winactivate again as a loops.The problem is this program change title all the time so when title has changed this will make autoit can't winactivate this program.thanks for every replies.

Share this post


Link to post
Share on other sites



check for CLASS name.

 

Saludos


 

venezuela.png Would you like to say thank to Danyfirex using a warmy way?  offer me a cup of coffee... coffee.png

autoit_scripter_blue_userbar.png

       AutoIt...

 

 

Share this post


Link to post
Share on other sites

What are some of the titles?

Is there anything in common between them?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Handles don't change.  Use those.

If your app does open many windows, each window get's a handle.  You can verify that the window is part of your process by using:

_WinAPI_GetWindowThreadProcessId

example:

$hGui = GUICreate("Title")
GUISetState()
ConsoleWrite(WinGetTitle($hGui) & @CRLF)

Sleep(1000)
WinSetTitle($hGui,"","New Title")
ConsoleWrite(WinGetTitle($hGui) & @CRLF)

Sleep(1000)
WinSetTitle($hGui,"","Another New Title")
ConsoleWrite(WinGetTitle($hGui) & @CRLF)

Sleep(1000)
WinSetTitle($hGui,"","Last New Title")
ConsoleWrite(WinGetTitle($hGui) & @CRLF)

 

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

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