Jump to content
Sign in to follow this  

Window Handle

Recommended Posts


Suppose I have a few Windows Explorers windows open. With this line I open a new window:

Run("c:\windows\explorer.exe /e, C:", "", @SW_HIDE)

Then I want to move the new window to a specific location.

How do I get the handle to the newly opened window? I mean I need to do something like this:

$handle=WinGetHandle(Run("c:\windows\explorer.exe /e, C:"), "", @SW_HIDE)

WinMove($handle,"", 0, 0, 200, 200)

Is there a way of doing it?


Share this post

Link to post
Share on other sites

Run() returns a PID... pass that pid to the processgetwin function here...



Thanks Larry. I think there is a typo in _ProcessGetHWnd.au3. Line 30 should read:

Local $aReturn[1][1] , $aWin = WinList($sTitle)

Anyways, how I can move/resize a window using $handle? WinMove uses window title.

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.