Jump to content

Difficulties using the Java UDF


 Share

Recommended Posts

Hi all,

I am trying to use the Java UDF (link) and I'm running into some major problems with the API. Here is what I'm trying currently:

#include <Java.au3>

WinActivate("Oracle Applications")
_JavaAttachAndWait("Oracle Applications")

Send("{F11}")
Sleep(1000)

_JavaObjValueSet("", "Order Number", "text", "1%")

I got the name and role of the text box by using Java Ferret. When I run this code, the script enters the text "1%" in the wrong text field. I've played around with the code a bit and I've determined that the function will enter "1%" in whatever field has the current keyboard focus, regardless of what the name is.

Another (related) problem is that _JavaObjValueSet() doesn't bother to check what it's actually doing. For instance, you could pass a bogus name to the function and it'll still "work" and return 1. I think this is a pretty major bug. Is it even possible for this function to return 0?

Has anyone else run into these issues?

- Kyle

Link to comment
Share on other sites

  • 1 month later...

Hi all,

I am trying to use the Java UDF (link) and I'm running into some major problems with the API. Here is what I'm trying currently:

#include <Java.au3>

WinActivate("Oracle Applications")
_JavaAttachAndWait("Oracle Applications")

Send("{F11}")
Sleep(1000)

_JavaObjValueSet("", "Order Number", "text", "1%")

I got the name and role of the text box by using Java Ferret. When I run this code, the script enters the text "1%" in the wrong text field. I've played around with the code a bit and I've determined that the function will enter "1%" in whatever field has the current keyboard focus, regardless of what the name is.

Another (related) problem is that _JavaObjValueSet() doesn't bother to check what it's actually doing. For instance, you could pass a bogus name to the function and it'll still "work" and return 1. I think this is a pretty major bug. Is it even possible for this function to return 0?

Has anyone else run into these issues?

- Kyle

Hi Kyle,

I'm struggling to get time to work on the Java UDF these days. Work is so busy and my home life is busy too. There are so many different Java applications out there that it's hard to design a "one solution fits all" Java UDF. But I'm trying my best.

I had worked with an Oracle Web application called "Oracle Developer" earlier this year, and managed to get the UDF to work with that application. It was a tough one. I'm imagining "Oracle Applications" is going to be another tough one. I recall with Oracle Developer that we had some issues in getting the UDF to recognise the right Java field. Sounds like you also have this issue. The luxury I had with working with Oracle Developer was that it was on a public website, and I was given user access to login and actually fix my UDF realtime. It was a great experience, and I could never have fixed the UDF without getting hands on.

I'm about to go to bed right now. Just wanted to let you know that I want to help. If I could get my hands on a publically accessible Oracle Applications website, and see first hand what this "Order Number" field is doing, I think I'll have a chance. Failing that, maybe I can create a debug version of the UDF that will give us a clue what's going on underneath.

Yes the UDF does still need alot of work I'll admit. I remember alot of functions didn't have good error handling. Yes the return value is probably useless at the moment (a major bug as you say). It is a time-consuming UDF to work on. I hope to have alot more time to work on it in the future.

I'll keep in touch, and I guess I can create a debug version and work with you in the future. Is there anyway I can get my hands this sort of app., and see the "Order Number" field myself?

Sean.

Cheers, Sean.

See my other UDFs:

Chrome UDF - Automate Chrome | SAP UDF - Automate SAP | Java UDF - Automate Java Applications & Applets | Tesseract (OCR) UDF - Capture text from applications, controls and the desktop | Textract (OCR) UDF - Capture text from applications and controls | FileSystemMonitor UDF - File, Folder, Drive and Shell Monitoring | VLC (Media Player) UDF - Creating and controlling a VLC control in AutoIT | Google Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoIT | SAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBox | eBay UDF - Automate eBay using the eBay API | ChildProc (Parallel Processing) UDF - Parallel processing functions for AutoIT | HyperCam (Screen Recording) UDF - Automate the HyperCam screen recorder | Twitter UDF - Automate Twitter using OAuth and the Twitter API | cURL UDF - a UDF for transferring data with URL syntax

See my other Tools:

Rapid Menu Writer - Add menus to DVDs in seconds | TV Player - Automates the process of playing videos on an external TV / Monitor | Rapid Video Converter - A tool for resizing and reformatting videos | [topic130531]Rapid DVD Creator - Convert videos to DVD fast and for free | ZapPF - A tool for killing processes and recycling files | Sean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoIT | Sean's GUI Inspector - A scripting tool for querying GUIs | TransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey Planner | Automate Qt and QWidgets | Brisbane City Council Event Viewer - See what's going on in Brisbane, Australia
Link to comment
Share on other sites

Hi all,

I am trying to use the Java UDF (link) and I'm running into some major problems with the API. Here is what I'm trying currently:

#include <Java.au3>

WinActivate("Oracle Applications")
_JavaAttachAndWait("Oracle Applications")

Send("{F11}")
Sleep(1000)

_JavaObjValueSet("", "Order Number", "text", "1%")

I got the name and role of the text box by using Java Ferret. When I run this code, the script enters the text "1%" in the wrong text field. I've played around with the code a bit and I've determined that the function will enter "1%" in whatever field has the current keyboard focus, regardless of what the name is.

Another (related) problem is that _JavaObjValueSet() doesn't bother to check what it's actually doing. For instance, you could pass a bogus name to the function and it'll still "work" and return 1. I think this is a pretty major bug. Is it even possible for this function to return 0?

Has anyone else run into these issues?

- Kyle

You won't believe this (well I can't believe it), but I found a publicly accessible Oracle Applications website. Don't ask me how. And lo and behold, I was able to login. It must be a test environment of sorts. Anyhow, I've learned alot about Oracle Applications in the past 1 hour. It is an ERP system, from what I can tell. I am familiar with ERP systems, having worked with SAP and Workbrain for the past 18 months. So it's an environment not unfamiliar to me.

From the description of an "Order Number" field, I'm guessing you are in the Order Management module of Oracle Apps. Is this correct? I have been able to bring up it's functions, such as:

Order Organiser

Sales Orders

Purchase Release

Requisition Import

Am I in the right area here? Actually I've just opened the Order Organiser, and I get a "Find Orders" window with the fields:

Order Number

Order Type

Created By

Customer PO

Interesting. Is this the "Order Number" field you are trying to automate?

Cheers, Sean.

See my other UDFs:

Chrome UDF - Automate Chrome | SAP UDF - Automate SAP | Java UDF - Automate Java Applications & Applets | Tesseract (OCR) UDF - Capture text from applications, controls and the desktop | Textract (OCR) UDF - Capture text from applications and controls | FileSystemMonitor UDF - File, Folder, Drive and Shell Monitoring | VLC (Media Player) UDF - Creating and controlling a VLC control in AutoIT | Google Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoIT | SAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBox | eBay UDF - Automate eBay using the eBay API | ChildProc (Parallel Processing) UDF - Parallel processing functions for AutoIT | HyperCam (Screen Recording) UDF - Automate the HyperCam screen recorder | Twitter UDF - Automate Twitter using OAuth and the Twitter API | cURL UDF - a UDF for transferring data with URL syntax

See my other Tools:

Rapid Menu Writer - Add menus to DVDs in seconds | TV Player - Automates the process of playing videos on an external TV / Monitor | Rapid Video Converter - A tool for resizing and reformatting videos | [topic130531]Rapid DVD Creator - Convert videos to DVD fast and for free | ZapPF - A tool for killing processes and recycling files | Sean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoIT | Sean's GUI Inspector - A scripting tool for querying GUIs | TransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey Planner | Automate Qt and QWidgets | Brisbane City Council Event Viewer - See what's going on in Brisbane, Australia
Link to comment
Share on other sites

Oh dear. I'm having a hard time finding an instance of Oracle Applications that uses JInitiator V1.3x or higher. The website I found earlier, in my last post, turns out to be a test environment using JInitiator V1.1.8.16. This is not compatible with Java Access Bridge v2.0.1, and Java Ferret subsequently doesn't recognise it. Woah-is-me.

I will keep looking. Must be another Oracle Apps public website using JInit. 1.3 for above!?

Cheers, Sean.

See my other UDFs:

Chrome UDF - Automate Chrome | SAP UDF - Automate SAP | Java UDF - Automate Java Applications & Applets | Tesseract (OCR) UDF - Capture text from applications, controls and the desktop | Textract (OCR) UDF - Capture text from applications and controls | FileSystemMonitor UDF - File, Folder, Drive and Shell Monitoring | VLC (Media Player) UDF - Creating and controlling a VLC control in AutoIT | Google Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoIT | SAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBox | eBay UDF - Automate eBay using the eBay API | ChildProc (Parallel Processing) UDF - Parallel processing functions for AutoIT | HyperCam (Screen Recording) UDF - Automate the HyperCam screen recorder | Twitter UDF - Automate Twitter using OAuth and the Twitter API | cURL UDF - a UDF for transferring data with URL syntax

See my other Tools:

Rapid Menu Writer - Add menus to DVDs in seconds | TV Player - Automates the process of playing videos on an external TV / Monitor | Rapid Video Converter - A tool for resizing and reformatting videos | [topic130531]Rapid DVD Creator - Convert videos to DVD fast and for free | ZapPF - A tool for killing processes and recycling files | Sean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoIT | Sean's GUI Inspector - A scripting tool for querying GUIs | TransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey Planner | Automate Qt and QWidgets | Brisbane City Council Event Viewer - See what's going on in Brisbane, Australia
Link to comment
Share on other sites

I can't provide any more support with this Kyle, until I'm able to debug AutoITJavaAccess.dll against an instance of Oracle Applications using JInitiator 1.3x or higher on my computer.

The bug will be within AutoITJavaAccess.dll, which I've written as a "bridge" (so to speak) between the Java Access Bridge (v2.0.1) and the Java UDF. It is the core of the Java UDF solution. It changed significantly in V0.6 of the UDF, after my work with tbui and Oracle Developer.

Oracle seems to be going the Java path these days, with the heavy weight applications that it's developing. It's really going to put my UDF through it's paces. There are many ways to implement Java. I have seen at least three different types of Java app out there. It would seem, on the face of it, that Oracle Applications is another type (perhaps different again from Oracle Developer).

If anyone else is reading this post, and can provide me access to Oracle Applications, it would be greatly appreciated.

Thanks,

Sean.

Edited by seangriffin

Cheers, Sean.

See my other UDFs:

Chrome UDF - Automate Chrome | SAP UDF - Automate SAP | Java UDF - Automate Java Applications & Applets | Tesseract (OCR) UDF - Capture text from applications, controls and the desktop | Textract (OCR) UDF - Capture text from applications and controls | FileSystemMonitor UDF - File, Folder, Drive and Shell Monitoring | VLC (Media Player) UDF - Creating and controlling a VLC control in AutoIT | Google Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoIT | SAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBox | eBay UDF - Automate eBay using the eBay API | ChildProc (Parallel Processing) UDF - Parallel processing functions for AutoIT | HyperCam (Screen Recording) UDF - Automate the HyperCam screen recorder | Twitter UDF - Automate Twitter using OAuth and the Twitter API | cURL UDF - a UDF for transferring data with URL syntax

See my other Tools:

Rapid Menu Writer - Add menus to DVDs in seconds | TV Player - Automates the process of playing videos on an external TV / Monitor | Rapid Video Converter - A tool for resizing and reformatting videos | [topic130531]Rapid DVD Creator - Convert videos to DVD fast and for free | ZapPF - A tool for killing processes and recycling files | Sean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoIT | Sean's GUI Inspector - A scripting tool for querying GUIs | TransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey Planner | Automate Qt and QWidgets | Brisbane City Council Event Viewer - See what's going on in Brisbane, Australia
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...