Jump to content

Java UDF menu item bug


vvb
 Share

Recommended Posts

Hey all,

I've been playing with the Java UDF and am trying to perform menu selections. Howeverm the menu remains selected.

For example, I have a menu named Manage with two menu items, named Connect and Import.

Now, when I do the following, the menu remains visible.

;; connect
; manage menu
_JavaObjSelect("", "Manage", "menu")
; connect menu item
_JavaObjSelect("", "Connect", "menu item")

I had to do a

ControlSend($dlg, "", "{ESCAPE}")
to get rid of the menu. This is fine, but not desireable. However, when performing the following:

ControlSend($bde, "", "", "{ESCAPE}")

;; import
; manage menu
_JavaObjSelect("", "Manage", "menu")
; import menu item
_JavaObjSelect("", "Import...", "menu item")

This brings up a modal file selection dialogue (JFileChooser). The problem is that because the menu does not disappear , the AutoIt script remains in a wait state (line 600 of Java.au3) until I dismiss the file selection dialog and manually bring it up again. Line 600 of Java.au3 is the following:

$sss = DllCall("AutoITJavaAccess.dll", "int:cdecl", "JavaObjSelect", "hwnd", $java_hwnd, "str", $javaferret_obj_name, "str", $javaferret_obj_role, "int", $instance_num)

Is there a way around this?

Kind Regards,

Vlad

I'll be AutoIting my entire system soon.

Link to comment
Share on other sites

Sorry, totally missed it. Could an admin please move it to the general support section.

Thanks you.

BUMP! Can anyone give me some clues as to what I'm doing wrong?

I'll be AutoIting my entire system soon.

Link to comment
Share on other sites

  • 1 year later...

Did you try using _JavaObjDeselect() on the menu after you clicked on item in it? Since it actually doesn't move your mouse, it should work even "under" window which you get (I suppose, also you should attach to this window with _JavaAttachAndWait if you want to perform anything in it) after you click the item in menu.

Edited by Destabilizator
Link to comment
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
 Share

  • Recently Browsing   0 members

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