Sign in to follow this  
Followers 0
alanRichardson

Use of Handles in AutoItX3.dll

4 posts in this topic

Hi,

I am building a small wrapper around autoitx3.dll using jna in java.

I have managed to get many of the AutoItX functions working and have retrieved window handles successfully from WinGetHandle.

The AutoItX help file says that the handle is for use with the advance WinTitleMatchMode that allows you to use classnames and handles to specify windows rather than title and text.

WinTitleMatchMode advanced mode doesn't seem to have a property for hwnd is there an undocumented "[HWND:0123456]" type access? Or is it not possible to feed a hwnd back into the win* functions when using the dll?

Any help appreciated.

Thanks,

Alan

Share this post


Link to post
Share on other sites



I don't believe the dll will support the handles, but I'm not sure. It might be java not interoping well.

Share this post


Link to post
Share on other sites

Thanks.

I have worked out how to use handles in the dll.

It seems that there is an Advanced Window Description property that is not mentioned in the help file.

HANDLE

so [HANDLE:0123456] where 0123456 is the hwnd will allow the functions which take an hwnd to accept one as a String through the dll interface - note that I only checked this with WinActivate and WinClose, but I assume these all use generic param checking code.

The only reason I found this was that I looked in the old AutoIt c++ sourcecode on the site and saw that AutoIt used to support a calling mechanism of "handle=0123456" so I just tried HANDLE with the latest Advanced Window Description calling convention.

Hope this helps someone else too.

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