Sign in to follow this  
Followers 0
Simplify iT

Change Inactive Window To Active

3 posts in this topic

Hi people,

Need a quick bit of help. I am working with a process to automate some stuff the first time a user logons on to windows. A few screen's open and the one i want to do stuff with is inactive. How can i check to see if it is there and if so make it active?

Any and all help greatly appreciated :think:

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Something like this perhaps:

$title = WinGetHandle("MyProgram Title")
If $title = 0 Then
    MsgBox(0,"Not Found", "The window title specified was not found!")
Else
    WinActivate($title)
    WinWaitActive($title)
EndIf

After talking with you on MSN, try:

Opt("WinTitleMatchMode",4)

$popup = WinGetHandle("classname=#32770")
If @Error = 1 Then
    MsgBox(0,"Not Found", "The window: AnyDVD Popup is not found!")
    Exit
EndIf
$anydvd = WinGetHandle("classname=TMainForm")
If @Error = 1 Then
    MsgBox(0,"Not Found", "The window: AnyDVD not found!")
    Exit
EndIf

WinActivate($popup)
WinWaitActive($popup)
; do whatever to the popup here

WinActivate($anydvd)
WinWaitActive($anydvd)
; do whatever to anydvd main window here
Edited by Simucal

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

Something like this perhaps:

$title = WinGetHandle("MyProgram Title")
If $title = 0 Then
    MsgBox(0,"Not Found", "The window title specified was not found!")
Else
    WinActivate($title)
    WinWaitActive($title)
EndIf

After talking with you on MSN, try:

Opt("WinTitleMatchMode",4)

$popup = WinGetHandle("classname=#32770")
If @Error = 1 Then
    MsgBox(0,"Not Found", "The window: AnyDVD Popup is not found!")
    Exit
EndIf
$anydvd = WinGetHandle("classname=TMainForm")
If @Error = 1 Then
    MsgBox(0,"Not Found", "The window: AnyDVD not found!")
    Exit
EndIf

WinActivate($popup)
WinWaitActive($popup)
; do whatever to the popup here

WinActivate($anydvd)
WinWaitActive($anydvd)
; do whatever to anydvd main window here
Thankyou again for your fantastic and FAST help - you have saved me a great deal of time and headache Simucal - plus i have learned a great deal from you! It is people such as yourself that make the autoit community such a fantastic place!

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  
Followers 0