Jump to content
Sign in to follow this  
marcushe

Fail in getting ClassNameNN from WPF application

Recommended Posts

marcushe

Working Environment: Vista SP1, WPF application ,autoit

Target : Use autoit to click on 'Cancel' button on WPF

Step:

1. install Ranorex Spy to get NAME property of button - Cancel

2. include <DotNetIdentification.au3>

3. Launch au3info.exe to get title and text ,Au3info can merely get wintitle ,other info as class/classNN/Text are all null

4. Invok NET_ControlGetHandleByName($wintitle,$Wintext,$Control)

Result:

Autoit didn't click Cancel button

I find when WinGetClassList is invoked in NET_ControlGetHandleByName.au3 , Return value is "" ,however, @error=0

So , WinGetClassList is the root cause.

My Question:

Must i use C++ .net to implement this script? Any good suggestion?

Edited by marcushe

Share this post


Link to post
Share on other sites
SmOke_N

.NET apps are a pain. In my experience, when I can't manipulate one of their controls (usually the grid control), I find that there are underlying controls to that control. So the search constantly goes on to find the correct sequence.

I have successfully manipulated a few .NET apps, but I think dll injection (if you know how to code in languages that can do that) is the better bet with these apps. Memory manipulation could be a good choice. But if none of those are an option or you don't have the ability, and you can't dig far enough down to get the correct control (assuming you don't actually have it), then I haven't the foggiest on how to help you... sorry.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
marcushe

.NET apps are a pain. In my experience, when I can't manipulate one of their controls (usually the grid control), I find that there are underlying controls to that control. So the search constantly goes on to find the correct sequence.

I have successfully manipulated a few .NET apps, but I think dll injection (if you know how to code in languages that can do that) is the better bet with these apps. Memory manipulation could be a good choice. But if none of those are an option or you don't have the ability, and you can't dig far enough down to get the correct control (assuming you don't actually have it), then I haven't the foggiest on how to help you... sorry.

Ha, tanks SmOke_N .

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.