Jump to content

can't get handle a window


Recommended Posts

Hello guys

I have a problem with get handle a window. I have simple code here:

Run("C:\Window\Firefox\firefox.exe")   ;this is location firefox in my computer
$hWnd =WinWait("[CLASS:MozillaWindowClass]", "", 10)   
Sleep(2000)
ControlSend($hWnd,"","","{CTRLDOWN}{SHIFTDOWN}B{CTRLUP}{SHIFTUP}",0)  ;open window Library
Sleep(2000)
$hWnd2 =WinWait("Library", "", 10)
if IsObj($hWnd2) Then MsgBox(0,0,0)

This code can't get handle which have title is Library. So autoit doesn't show MsgBox(0,0,0). I try function Wingethandle but it return same result. 

I can not solve this problem. Do you help me, please?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...