Sign in to follow this  
Followers 0
Kenle

Autoit detects Java UI

10 posts in this topic

Hi Guys,

I have been trying to use SearchImage. But it cannot work on SWT_Window0 (Java UI). So Could you pls give me some hints to get rid of it.

Share this post


Link to post
Share on other sites



9 hours ago, Kenle said:

Hi Guys,

I have been trying to use SearchImage. But it cannot work on SWT_Window0 (Java UI). So Could you pls give me some hints to get rid of it.

What do you want to get rid of? 

 

I've found it useful to take a screen shot and use imagesearch on the hBitmap.  The newest version of SearchImage supports this.  

Share this post


Link to post
Share on other sites

Code?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

On 12.4.2016 at 9:18 PM, junkew said:

Maybe this can help 

 

 

 

Here is the case. I use Search Image to detect these botton in java UI but it is not working.

1.JPG

Edited by Kenle

Share this post


Link to post
Share on other sites

So have you looked at what junkew posted?  Did you get any information about said buttons?  Did you write any code?  Can we see it?

Share this post


Link to post
Share on other sites
12 hours ago, markyrocks said:

So have you looked at what junkew posted?  Did you get any information about said buttons?  Did you write any code?  Can we see it?

While Not ( $result0=1 )

     $result0 = _ImageSearch('load.bmp',1,$x1,$y1,255)

WEnd
        MsgBox(0,"","done")

This is my code for tracking a Java UI changing or not, but it always return 1 even nothing happened

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Well I don't have the imagesearch file infront of me but as I said before use the  (google) updated imagesearch library.   2.  Have the script take a screen capture  (google autoit screen capture )  then use a hBitmap from memory to search.   By the time you read up on all that you'll know what an hBitmap is.  And then you'll all be like "that's cool". Also google autoit _gdiplus_

Only thing I can really add is alot of programs these days are resistant to automation.  The images displayed have dummy pixels or something that seem to change then you'll have a pixel that looks green but autoit info tool says it's blue .  It's hard to explain.   So taking a screen shot basically freezes the display,  and can be converted to dumb down colors,   you can almost make a picture look like extremely pixel ated.  I even go as far as writing pixel by pixel to a file and comparing the results to what the autoit info displays.

Edited by markyrocks

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