Jump to content

Recommended Posts

Posted

Hi,

I would like to automate Java with a button click.

My sample code is shown as below

##############################################################################################

$java_obj1 = _JavaObjValuesGet("[CLASS:Button; Instance:1]", "", "push button", 1)

MsgBox(262144, "Text.au3", "Push button = " & $java_obj1 & "" & @CRLF)

ControlClick("[Class: SunAwtFrame]","", $java_obj1)

##############################################################################################

However, the message box shows "Push button = ", that mean nothing can be matched.

Then I tried to select the Java object as below

##############################################################################################

$java_obj1 = _JavaObjSelect("[CLASS:Button; Instance:2]", "", "push button")

MsgBox(262144, "Text.au3", "Push button = " & $java_obj1 & "" & @CRLF)

ControlClick("[Class: SunAwtFrame]","", $java_obj1)

##############################################################################################

The message box can show "Push button = 1", but the button cannot be clicked.

Do you have any idea to solve it?

Or is it possible to automate Java button clicking without Java UDF?

Many thanks.

Posted

I check with that

http://www.autoitscript.com/forum/index.php?showtopic=87956

Do you have any idea to click Java button by using other method?

Thanks.

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
  • Recently Browsing   0 members

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