Keung Posted July 8, 2010 Share Posted July 8, 2010 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. Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 8, 2010 Share Posted July 8, 2010 Where did these _JavaObj functions come from? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Keung Posted July 9, 2010 Author Share Posted July 9, 2010 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now