Jump to content



Photo

Java UDF


  • Please log in to reply
88 replies to this topic

#1 seangriffin

seangriffin

    Polymath

  • Active Members
  • PipPipPipPip
  • 223 posts

Posted 19 January 2009 - 11:10 AM

This UDF provides automation support for Java applications.

This UDF currently automates standalone applications and browser-based applets, developed in either Swing or the Abstract Window Toolkit (AWT).

REQUIREMENTS:
  • AutoIt3 3.2 or higher
  • Java Runtime Environment (JRE) 1.4 or above
  • Java Access Bridge for the Microsoft Windows Operating System
  • Microsoft Visual C++ 2008 Redistributable
  • AutoIT for Java Access dynamically linked library (DLL)
  • Tesseract UDF 0.6
  • Manual check and update of the Java Access Bridge
INSTALLATION:
To install the latest Java Runtime Environment (JRE):
  • Open the web page http://java.com/en/download/manual.jsp.
  • Click Windows XP/Vista/2000/2003 Offline.
  • Save the file to your computer and run it (ie. jre-6u11-windows-i586-p-s.exe).
  • Follow the installation instructions.
  • Restart your computer when prompted.
To install the Java Access Bridge for the Microsoft Windows Operating System:
  • Open the web page Java Access Bridge.
  • Click Download Java Access Bridge 2.0.1.
  • Click I agree to the Software License Agreement.
  • Click Continue.
  • Click accessbridge-2_0_1.exe.
  • Save the file to a location on your computer.
  • Run the file accessbridge-2_0_1.exe from your computer.
  • Follow the installation instructions.
  • Restart your computer when prompted.
To install the Microsoft Visual C++ 2008 Redistributable:
  • Open the web page http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en.
  • Click Download.
  • Save the file to a location on your computer.
  • Run the file vcredist_x86.exe from your computer.
  • Follow the installation instructions.
To install the AutoIT for Java Access dynamically linked library (DLL):
  • Right-click on the link AutoITJavaAccess.dll below.
  • Save the file to your Windows System32 folder (ie. C:\WINDOWS\system32).
To install the Tesseract UDF 0.6:
To manually check and update the Java Access Bridge:

Note:- This step should be performed in addition to the install of the Java Access Bridge above.
  • Using Windows Explorer, go to your Java folder C:\Program Files\Java.
  • Open the first subfolder (ie. j2re1.4.2_19).
  • Go to the subfolder lib\ext.
  • If the files access-bridge.jar and jaccess.jar already exist then go to step 9 below.
  • Copy the file access-bridge.jar to this subfolder (ie. C:\Program Files\Java\jre1.4.2_19\lib\ext).
  • If the subfolder in step 2 above starts with j2re1.2 or jre1.2, then copy the file jaccess-1_2.jar to this subfolder (ie. C:\Program Files\Java\jre1.4.2_19\lib\ext).
  • If the subfolder in step 2 above starts with j2re1.3 or jre1.3, then copy the file jaccess-1_3.jar to this subfolder (ie. C:\Program Files\Java\jre1.4.2_19\lib\ext).
  • If the subfolder in step 2 above starts with j2re1.4 or jre1.4, then copy the file jaccess-1_4.jar to this subfolder (ie. C:\Program Files\Java\jre1.4.2_19\lib\ext).
  • Repeat steps 3 to 8 for every subfolder within the Java folder.

To confirm that the installation process was successful:
  • Using Windows Explorer, go to C:\Program Files\Java Access Bridge and double-click JavaFerret.exe.
  • In the Java Ferret window, select the menu item JavaEvents -> Track Mouse Events.
  • Drag your mouse over any Java application, and the Java Ferret window should dynamically update with information about the Java objects as you drag your mouse over them.
LIST OF FUNCTIONS:

_JavaAttachAndWait($win_title)
_JavaObjValueGet($autoit_cntl_id, $javaferret_obj_name = "", $javaferret_obj_role = "", $instance_num = 1)
_JavaObjIndexGet($autoit_cntl_id, $javaferret_obj_name = "", $javaferret_obj_role = "", $instance_num = 1)
_JavaObjValueSet($autoit_cntl_id, $javaferret_obj_name, $javaferret_obj_role, $object_value, $instance_num = 1, $partial = 1, $get_last_capture = 0, $delimiter = "", $expand = 1, $scrolling = 1, $cleanup = 1, $max_scroll_times = 5, $scale = 2, $left_indent = 0, $top_indent = 0, $right_indent = 0, $bottom_indent = 0, $show_capture = 0)
_JavaObjSelect($autoit_cntl_id, $javaferret_obj_name = "", $javaferret_obj_role = "", $instance_num = 1)
_JavaObjValuesGet($autoit_cntl_id, $javaferret_obj_name = "", $javaferret_obj_role = "", $instance_num = 1, $get_last_capture = 0, $delimiter = "", $expand = 1, $scrolling = 1, $cleanup = 1, $max_scroll_times = 5, $scale = 2, $left_indent = 0, $top_indent = 0, $right_indent = 0, $bottom_indent = 0, $show_capture = 0)
_JavaObjDeselect($autoit_cntl_id, $javaferret_obj_name = "", $javaferret_obj_role = "", $instance_num = 1)
_JavaObjPropertyGet($autoit_cntl_id, $javaferret_obj_name = "", $javaferret_obj_role = "", $instance_num = 1, $property_name = "")
_JavaTableRowSelect($autoit_cntl_id, $javaferret_obj_name = "", $instance_num = 1, $javaferret_panel_name = "", $panel_instance_num = 1, $col_names = "", $col_values = "")
_JavaTableCellSelect($autoit_cntl_id, $javaferret_obj_name = "", $instance_num = 1, $javaferret_panel_name = "", $panel_instance_num = 1, $col_names = "", $col_values = "", $col_name_select = "")
_JavaTableCellValueGet($autoit_cntl_id, $javaferret_obj_name = "", $instance_num = 1, $javaferret_panel_name = "", $panel_instance_num = 1, $col_names = "", $col_values = "", $col_name_select = "")
_JavaTableCellValueSet($autoit_cntl_id, $javaferret_obj_name = "", $instance_num = 1, $javaferret_panel_name = "", $panel_instance_num = 1, $col_names = "", $col_values = "", $col_name_select = "", $object_value = "")

DEMONSTRATION:
<Under Construction>

EXAMPLES:
Attached File  _JavaObjValueGet.au3   14.44KB   3306 downloads
Attached File  _JavaObjValueSet.au3   7.36KB   2066 downloadsAttached File  _JavaObjValueSelect.au3   9.94KB   2227 downloads
Attached File  _JavaObjValuesGet.au3   6.2KB   1792 downloadsAttached File  _JavaObjPropertyGet.au3   6.4KB   1736 downloads
DOWNLOAD:

Latest Version - v0.7 (17/03/09)
Attached File  AutoITJavaAccess.dll   51KB   3016 downloadsAttached File  Java.au3   54.37KB   3709 downloads

Edited by seangriffin, 05 October 2009 - 12:48 AM.

  • syk3s likes this
Cheers,Sean.See my other UDFs:SAP UDF - Automate SAPJava UDF - Automate Java Applications & AppletsTesseract (OCR) UDF - Capture text from applications, controls and the desktopTextract (OCR) UDF - Capture text from applications and controlsFileSystemMonitor UDF - File, Folder, Drive and Shell MonitoringVLC (Media Player) UDF - Creating and controlling a VLC control in AutoITGoogle Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoITSAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBoxeBay UDF - Automate eBay using the eBay APIChildProc (Parallel Processing) UDF - Parallel processing functions for AutoITHyperCam (Screen Recording) UDF - Automate the HyperCam screen recorderTwitter UDF - Automate Twitter using OAuth and the Twitter APIcURL UDF - a UDF for transferring data with URL syntaxSee my other Tools:Rapid Menu Writer - Add menus to DVDs in secondsTV Player - Automates the process of playing videos on an external TV / MonitorRapid Video Converter - A tool for resizing and reformatting videosRapid DVD Creator - Convert videos to DVD fast and for freeZapPF - A tool for killing processes and recycling filesSean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoITSean's GUI Inspector - A scripting tool for querying GUIsTransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey PlannerAutomate Qt and QWidgetsBrisbane City Council Event Viewer - See what's going on in Brisbane, Australia







#2 yehia

yehia

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 274 posts

Posted 19 January 2009 - 11:13 AM

Edit: Wow looks cool yet
and thanks for posting :)

Edited by yehia, 19 January 2009 - 08:45 PM.


#3 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,760 posts

Posted 19 January 2009 - 04:57 PM

Great project!

I'll give it a try.

Mega

Scripts & functions Organize Includes Let Scite organize the include files *new

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times


#4 Valuater

Valuater

    www.PayFreeWireless.com

  • MVPs
  • 11,078 posts

Posted 19 January 2009 - 06:42 PM

Repeat steps 3 to 8 for every subfolder within the Java folder.


Maybe write a quick little installer...???

8)

Posted Image

Clic The Pic!!!


#5 seangriffin

seangriffin

    Polymath

  • Active Members
  • PipPipPipPip
  • 223 posts

Posted 19 January 2009 - 10:59 PM

Maybe write a quick little installer...???

8)


Thanks everyone for the positive feedback already (after only posting this last night!) :)

Good call Valuater. I'm going to try and do this using NSIS. I was hoping this step wouldn't be necessary, but I've found (on my computer anyway) that after installing the Java Access Bridge it hadn't automatically placed the Bridge into all the Java Runtime Environments (JREs) on my computer (like it said it would). Maybe it's a bug in V2.0.1 of the Bridge. At least my own installer should get the job done.
  • Pincopanco likes this
Cheers,Sean.See my other UDFs:SAP UDF - Automate SAPJava UDF - Automate Java Applications & AppletsTesseract (OCR) UDF - Capture text from applications, controls and the desktopTextract (OCR) UDF - Capture text from applications and controlsFileSystemMonitor UDF - File, Folder, Drive and Shell MonitoringVLC (Media Player) UDF - Creating and controlling a VLC control in AutoITGoogle Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoITSAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBoxeBay UDF - Automate eBay using the eBay APIChildProc (Parallel Processing) UDF - Parallel processing functions for AutoITHyperCam (Screen Recording) UDF - Automate the HyperCam screen recorderTwitter UDF - Automate Twitter using OAuth and the Twitter APIcURL UDF - a UDF for transferring data with URL syntaxSee my other Tools:Rapid Menu Writer - Add menus to DVDs in secondsTV Player - Automates the process of playing videos on an external TV / MonitorRapid Video Converter - A tool for resizing and reformatting videosRapid DVD Creator - Convert videos to DVD fast and for freeZapPF - A tool for killing processes and recycling filesSean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoITSean's GUI Inspector - A scripting tool for querying GUIsTransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey PlannerAutomate Qt and QWidgetsBrisbane City Council Event Viewer - See what's going on in Brisbane, Australia

#6 seangriffin

seangriffin

    Polymath

  • Active Members
  • PipPipPipPip
  • 223 posts

Posted 20 January 2009 - 08:46 AM

Can someone do me a favour and download AutoITJavaAccess.dll from my post above, and save it to their C:\windows\system32 folder, and run the following command from an AutoIT script:

ConsoleWrite(dllopen("AutoITJavaAccess.dll"))

The command outputs a "1" in the console on my home computer, which is great. On the computer I use at work, it outputs a "-1". I hope no-one else gets a "-1".

Edited by seangriffin, 20 January 2009 - 08:46 AM.

Cheers,Sean.See my other UDFs:SAP UDF - Automate SAPJava UDF - Automate Java Applications & AppletsTesseract (OCR) UDF - Capture text from applications, controls and the desktopTextract (OCR) UDF - Capture text from applications and controlsFileSystemMonitor UDF - File, Folder, Drive and Shell MonitoringVLC (Media Player) UDF - Creating and controlling a VLC control in AutoITGoogle Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoITSAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBoxeBay UDF - Automate eBay using the eBay APIChildProc (Parallel Processing) UDF - Parallel processing functions for AutoITHyperCam (Screen Recording) UDF - Automate the HyperCam screen recorderTwitter UDF - Automate Twitter using OAuth and the Twitter APIcURL UDF - a UDF for transferring data with URL syntaxSee my other Tools:Rapid Menu Writer - Add menus to DVDs in secondsTV Player - Automates the process of playing videos on an external TV / MonitorRapid Video Converter - A tool for resizing and reformatting videosRapid DVD Creator - Convert videos to DVD fast and for freeZapPF - A tool for killing processes and recycling filesSean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoITSean's GUI Inspector - A scripting tool for querying GUIsTransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey PlannerAutomate Qt and QWidgetsBrisbane City Council Event Viewer - See what's going on in Brisbane, Australia

#7 ReFran

ReFran

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 554 posts

Posted 20 January 2009 - 12:49 PM

Can someone do me a favour and download AutoITJavaAccess.dll from my post above, and save it to their C:\windows\system32 folder, and run the following command from an AutoIT script:

ConsoleWrite(dllopen("AutoITJavaAccess.dll"))

The command outputs a "1" in the console on my home computer, which is great. On the computer I use at work, it outputs a "-1". I hope no-one else gets a "-1".


quick answer:

-1+>13:41:54 AutoIT3.exe ended.rc:0

Computer on work, with firewall, ...., but as Admin. (because its a notebook).
Perhaps it has to be registered first (regedit ...)

best regards, Reinhard

#8 seangriffin

seangriffin

    Polymath

  • Active Members
  • PipPipPipPip
  • 223 posts

Posted 21 January 2009 - 12:24 AM

quick answer:

-1+>13:41:54 AutoIT3.exe ended.rc:0

Computer on work, with firewall, ...., but as Admin. (because its a notebook).
Perhaps it has to be registered first (regedit ...)

best regards, Reinhard


Thanks so much Reinhard. Glad to see the issue is consistent across all computers except the computer I'm developing on. I ran "regsvr32 AutoITJavaAccess.dll" on another computer and got an error message that seems to indicate that the file is not correctly installed.

"AutoITJavaAccess.dll" is my first attempt at creating a DLL using MS Visual C++. I can build it and use it fine on my own computer, but after distributing it to other computers it doesn't work. It seems I have to build a (re)distributable package or installer of sorts, in order to distribute this DLL to other computers.

I'm going through a learning curve with Visual C++. You'll all have to bare with me until I sort this out. I think I'm nearly there though. Maybe in the next few days. I'm also having Windows Message Queue issues in my code, but again it's just because I'm new to C++ programming in Windows.

Edited by seangriffin, 21 January 2009 - 12:25 AM.

Cheers,Sean.See my other UDFs:SAP UDF - Automate SAPJava UDF - Automate Java Applications & AppletsTesseract (OCR) UDF - Capture text from applications, controls and the desktopTextract (OCR) UDF - Capture text from applications and controlsFileSystemMonitor UDF - File, Folder, Drive and Shell MonitoringVLC (Media Player) UDF - Creating and controlling a VLC control in AutoITGoogle Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoITSAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBoxeBay UDF - Automate eBay using the eBay APIChildProc (Parallel Processing) UDF - Parallel processing functions for AutoITHyperCam (Screen Recording) UDF - Automate the HyperCam screen recorderTwitter UDF - Automate Twitter using OAuth and the Twitter APIcURL UDF - a UDF for transferring data with URL syntaxSee my other Tools:Rapid Menu Writer - Add menus to DVDs in secondsTV Player - Automates the process of playing videos on an external TV / MonitorRapid Video Converter - A tool for resizing and reformatting videosRapid DVD Creator - Convert videos to DVD fast and for freeZapPF - A tool for killing processes and recycling filesSean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoITSean's GUI Inspector - A scripting tool for querying GUIsTransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey PlannerAutomate Qt and QWidgetsBrisbane City Council Event Viewer - See what's going on in Brisbane, Australia

#9 ptrex

ptrex

    Universalist

  • MVPs
  • 2,400 posts

Posted 21 January 2009 - 07:41 AM

@seangriffin

Maybe this can help, not sure :

Microsoft Visual C++ 2008 Redistributable Package

regards,

ptrex

#10 IndyUK

IndyUK

    Wayfarer

  • Active Members
  • Pip
  • 84 posts

Posted 22 January 2009 - 05:27 PM

Hi seangriffin...

This is great. Will this work with Java applications that use Swing? I've recently developed a script that drives a Java application which uses alot of mousemove and click command. Of course the problem there is the screen must remain the same geometery as it was designed on. However, if this allows me to reference the control directly...well that's just brill.

Do you have any examples or documentation that I could use?

Thanks for the great UDF.

Well done.

#11 seangriffin

seangriffin

    Polymath

  • Active Members
  • PipPipPipPip
  • 223 posts

Posted 23 January 2009 - 06:52 AM

@seangriffin

Maybe this can help, not sure :

Microsoft Visual C++ 2008 Redistributable Package

regards,

ptrex


Thanks ptrex. After doing some Googling I also discovered that this was probably going to be the easiest and quickest way for me to get my AutoITJavaAccess.dll installed on everyone's computer. I tried it and it worked. The DLL is now recognised as a DLL in AutoIT (phew). I've now included the "Microsoft Visual C++ 2008 Redistributable Package" in the REQUIREMENTS section above.

Edited by seangriffin, 23 January 2009 - 06:52 AM.

Cheers,Sean.See my other UDFs:SAP UDF - Automate SAPJava UDF - Automate Java Applications & AppletsTesseract (OCR) UDF - Capture text from applications, controls and the desktopTextract (OCR) UDF - Capture text from applications and controlsFileSystemMonitor UDF - File, Folder, Drive and Shell MonitoringVLC (Media Player) UDF - Creating and controlling a VLC control in AutoITGoogle Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoITSAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBoxeBay UDF - Automate eBay using the eBay APIChildProc (Parallel Processing) UDF - Parallel processing functions for AutoITHyperCam (Screen Recording) UDF - Automate the HyperCam screen recorderTwitter UDF - Automate Twitter using OAuth and the Twitter APIcURL UDF - a UDF for transferring data with URL syntaxSee my other Tools:Rapid Menu Writer - Add menus to DVDs in secondsTV Player - Automates the process of playing videos on an external TV / MonitorRapid Video Converter - A tool for resizing and reformatting videosRapid DVD Creator - Convert videos to DVD fast and for freeZapPF - A tool for killing processes and recycling filesSean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoITSean's GUI Inspector - A scripting tool for querying GUIsTransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey PlannerAutomate Qt and QWidgetsBrisbane City Council Event Viewer - See what's going on in Brisbane, Australia

#12 seangriffin

seangriffin

    Polymath

  • Active Members
  • PipPipPipPip
  • 223 posts

Posted 23 January 2009 - 06:58 AM

Hi seangriffin...

This is great. Will this work with Java applications that use Swing? I've recently developed a script that drives a Java application which uses alot of mousemove and click command. Of course the problem there is the screen must remain the same geometery as it was designed on. However, if this allows me to reference the control directly...well that's just brill.

Do you have any examples or documentation that I could use?

Thanks for the great UDF.

Well done.


I'm getting there IndyUK. Yes, so long as the JavaFerret.exe program (included in the Java Access Bridge) can recognise Java objects in your swing application, then this UDF should work for you. A couple of years ago I wrote my own Java application using Swing, and the Java Ferret works with it.

This post is under construction. I need to add much much more information about using this UDF. It's a little bit tricky, due to the nature of the Java Access Bridge. I have high hopes for this UDF. We'll see if I have what it takes to pull it off. This is the first time I've seen real Java applications automated, and I'm pretty excited about the concept. I think I may have overcome most of the issues I've been having in developing "AutoITJavaAccess.dll".

I'll remove the "Under Construction" disclaimer very soon. I think I may have something almost working. :)

Edited by seangriffin, 23 January 2009 - 06:59 AM.

Cheers,Sean.See my other UDFs:SAP UDF - Automate SAPJava UDF - Automate Java Applications & AppletsTesseract (OCR) UDF - Capture text from applications, controls and the desktopTextract (OCR) UDF - Capture text from applications and controlsFileSystemMonitor UDF - File, Folder, Drive and Shell MonitoringVLC (Media Player) UDF - Creating and controlling a VLC control in AutoITGoogle Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoITSAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBoxeBay UDF - Automate eBay using the eBay APIChildProc (Parallel Processing) UDF - Parallel processing functions for AutoITHyperCam (Screen Recording) UDF - Automate the HyperCam screen recorderTwitter UDF - Automate Twitter using OAuth and the Twitter APIcURL UDF - a UDF for transferring data with URL syntaxSee my other Tools:Rapid Menu Writer - Add menus to DVDs in secondsTV Player - Automates the process of playing videos on an external TV / MonitorRapid Video Converter - A tool for resizing and reformatting videosRapid DVD Creator - Convert videos to DVD fast and for freeZapPF - A tool for killing processes and recycling filesSean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoITSean's GUI Inspector - A scripting tool for querying GUIsTransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey PlannerAutomate Qt and QWidgetsBrisbane City Council Event Viewer - See what's going on in Brisbane, Australia

#13 ivan

ivan

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 398 posts

Posted 23 January 2009 - 02:45 PM

Sounds great, must try it. Thx 4 posting
Regards,
IVAN

#14 seangriffin

seangriffin

    Polymath

  • Active Members
  • PipPipPipPip
  • 223 posts

Posted 26 January 2009 - 02:07 PM

Just a quick note to let everyone know that this UDF is now officially at version 0.1 (and no longer "Under Contruction") :)

Please give it a try and provide lots of feedback. I'm really impressed with what it can do so far, but I think there is some way to go.

This version includes the ability to get values from Java objects, set the value of Java objects, and select Java objects.

I know the installation is not that simple at the moment. Hopefully I'll be able to automate the process somewhat in the near future. Once you've completed the installation, then I recommend you run the example _JavaObjValueGet.au3. If this script is able to retrieve values from Java applications, then the entire UDF should work for you.

Edited by seangriffin, 26 January 2009 - 02:19 PM.

Cheers,Sean.See my other UDFs:SAP UDF - Automate SAPJava UDF - Automate Java Applications & AppletsTesseract (OCR) UDF - Capture text from applications, controls and the desktopTextract (OCR) UDF - Capture text from applications and controlsFileSystemMonitor UDF - File, Folder, Drive and Shell MonitoringVLC (Media Player) UDF - Creating and controlling a VLC control in AutoITGoogle Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoITSAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBoxeBay UDF - Automate eBay using the eBay APIChildProc (Parallel Processing) UDF - Parallel processing functions for AutoITHyperCam (Screen Recording) UDF - Automate the HyperCam screen recorderTwitter UDF - Automate Twitter using OAuth and the Twitter APIcURL UDF - a UDF for transferring data with URL syntaxSee my other Tools:Rapid Menu Writer - Add menus to DVDs in secondsTV Player - Automates the process of playing videos on an external TV / MonitorRapid Video Converter - A tool for resizing and reformatting videosRapid DVD Creator - Convert videos to DVD fast and for freeZapPF - A tool for killing processes and recycling filesSean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoITSean's GUI Inspector - A scripting tool for querying GUIsTransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey PlannerAutomate Qt and QWidgetsBrisbane City Council Event Viewer - See what's going on in Brisbane, Australia

#15 dynty

dynty

    Seeker

  • Active Members
  • 6 posts

Posted 27 January 2009 - 11:41 AM

it is great thanks a lot :) i have been looking for it for some time too..

i have small problem,a lot of application does not have object in them properly "named"
if i noticed correctly,the only difference is that "Index in parent" is different for them
Isnt it possible to read the object based on this value instead of "Name" ?
Thanks a lot

Edited by dynty, 27 January 2009 - 11:43 AM.


#16 seangriffin

seangriffin

    Polymath

  • Active Members
  • PipPipPipPip
  • 223 posts

Posted 28 January 2009 - 02:18 AM

it is great thanks a lot :) i have been looking for it for some time too..

i have small problem,a lot of application does not have object in them properly "named"
if i noticed correctly,the only difference is that "Index in parent" is different for them
Isnt it possible to read the object based on this value instead of "Name" ?
Thanks a lot


Yes that's right. I have also noticed this. So I placed an "$instance_num" parameter at the end of my functions. You should be able to see this parameter at the end of all my functions so far (except for _JavaAttachAndWait of course).

I haven't described this parameter very well in Java.au3 yet. You can use this parameter to specify which instance of a java object to use in the function. It's designed to work with the second parameter "$javaferret_obj_role". Populate "$javaferret_obj_role" with the role of the object you want to work with (by getting the role from JavaFerret.exe), and specify the instance of that role to work with (a number from 1 onwards).

If you set "$instance_num", then you need to make sure the first and second parameters are not set ($autoit_cntl_id and $javaferret_obj_name).

There's examples of using instance_num in "_JavaObjValueGet.au3" and "_JavaObjValueSet.au3". For example:

$java_obj3 = _JavaObjValueGet("", "", "check box", 2)
$java_obj1 = _JavaObjValueSet("", "", "text", "5", 3)

Edited by seangriffin, 28 January 2009 - 02:21 AM.

Cheers,Sean.See my other UDFs:SAP UDF - Automate SAPJava UDF - Automate Java Applications & AppletsTesseract (OCR) UDF - Capture text from applications, controls and the desktopTextract (OCR) UDF - Capture text from applications and controlsFileSystemMonitor UDF - File, Folder, Drive and Shell MonitoringVLC (Media Player) UDF - Creating and controlling a VLC control in AutoITGoogle Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoITSAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBoxeBay UDF - Automate eBay using the eBay APIChildProc (Parallel Processing) UDF - Parallel processing functions for AutoITHyperCam (Screen Recording) UDF - Automate the HyperCam screen recorderTwitter UDF - Automate Twitter using OAuth and the Twitter APIcURL UDF - a UDF for transferring data with URL syntaxSee my other Tools:Rapid Menu Writer - Add menus to DVDs in secondsTV Player - Automates the process of playing videos on an external TV / MonitorRapid Video Converter - A tool for resizing and reformatting videosRapid DVD Creator - Convert videos to DVD fast and for freeZapPF - A tool for killing processes and recycling filesSean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoITSean's GUI Inspector - A scripting tool for querying GUIsTransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey PlannerAutomate Qt and QWidgetsBrisbane City Council Event Viewer - See what's going on in Brisbane, Australia

#17 seangriffin

seangriffin

    Polymath

  • Active Members
  • PipPipPipPip
  • 223 posts

Posted 01 February 2009 - 12:26 AM

V0.2 has been released. :)

The downloads on page 1 been updated to V0.2.

New functions include:

  • Java Combo box support
  • Java List box support
  • Deselecting Java Objects
  • Getting all values from multi-value Java Objects (ie. Java Combo boxes and Java List boxes)
I'd love to hear anyone's feedback on the UDF so far.

I'm having issues getting values from Java combo boxes and list boxes. The values returned appear to be encoded/encrypted. I get a feeling that Java has them encoded in some way, and I'm going to have to decode/decrypt the values. If anyone has any information on getting the proper text from Java combo boxes and list boxes, that will be a big help. The issue is evident when running the examples. jEdit does not have the problem, but piface and web applets do. Seems to be related to the fact that the AutoIT Info Window can recognise controls in piface and web applets, but not jEdit. Therefore the way jEdit exposes it's Java lists must be different to the other two apps.

The way I retrieve Java list box values from apps like piface and web applets is using the AutoIT "_GUICtrlListBox_GetText" function. This function makes a call to "_SendMessageA" which in turn calls the function "SendMessageA" in the DLL "user32.dll". The problem must therefore be in the data that this "SendMessageA" function is returning. SendMessageA is a forced ANSI call. Perhaps I should try calling "_SendMessage" instead. Maybe it's this forced ANSI conversion that's screwing up the text coming back from the listbox. I'll give this a try.

No luck. I'm convinced AutoIT and Java Access Bridge cannot read Java listboxes and combo boxes in some apps. I found other people with the same frustration on other forums. I'm going to move to screen scraping for these apps. I'm developing a Textract UDF which seems to have good results with recognising text inside Java list boxes. Unhappy that it's not freeware, and that there is no good free OCR packages out there. It's all I've got for now though. Will post an update soon on this.

Update 16/02/09:
I've developed a Tesseract UDF which performs nicely, and is free. Very happy. I now have a solution for reading listboxes and combo boxes for those troublesome Java apps I've described above.

Cheers,

Sean.

Edited by seangriffin, 17 March 2009 - 11:22 PM.

Cheers,Sean.See my other UDFs:SAP UDF - Automate SAPJava UDF - Automate Java Applications & AppletsTesseract (OCR) UDF - Capture text from applications, controls and the desktopTextract (OCR) UDF - Capture text from applications and controlsFileSystemMonitor UDF - File, Folder, Drive and Shell MonitoringVLC (Media Player) UDF - Creating and controlling a VLC control in AutoITGoogle Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoITSAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBoxeBay UDF - Automate eBay using the eBay APIChildProc (Parallel Processing) UDF - Parallel processing functions for AutoITHyperCam (Screen Recording) UDF - Automate the HyperCam screen recorderTwitter UDF - Automate Twitter using OAuth and the Twitter APIcURL UDF - a UDF for transferring data with URL syntaxSee my other Tools:Rapid Menu Writer - Add menus to DVDs in secondsTV Player - Automates the process of playing videos on an external TV / MonitorRapid Video Converter - A tool for resizing and reformatting videosRapid DVD Creator - Convert videos to DVD fast and for freeZapPF - A tool for killing processes and recycling filesSean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoITSean's GUI Inspector - A scripting tool for querying GUIsTransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey PlannerAutomate Qt and QWidgetsBrisbane City Council Event Viewer - See what's going on in Brisbane, Australia

#18 seangriffin

seangriffin

    Polymath

  • Active Members
  • PipPipPipPip
  • 223 posts

Posted 15 March 2009 - 07:21 AM

I've released V0.6 of the UDF today.

The downloads on page 1 been updated.

New features include:

  • More properties available to "_JavaObjPropertyGet"
  • Improvements to "_JavaAttachAndWait", "_JavaObjSelect" and "_JavaObjValueSet"
  • New function for getting the selected index in combo boxes and list boxes ("_JavaObjIndexGet")
  • Some basic table functions ("_JavaTableRowSelect", "_JavaTableCellSelect", "_JavaTableCellValueGet", "_JavaTableCellValueSet")

A big thanks goes to tbui who helped enormously in the improvements to "_JavaAttachAndWait", "_JavaObjSelect" and "_JavaObjValueSet". The result was that he was able to automate the web-based Oracle Application Server Forms Services application. This is a big step for the UDF to be able to automate a commercial grade application.

The new table functions will need more work, so I'd love anyone's feedback who has tried using them.

Cheers,

Sean.

Edited by seangriffin, 15 March 2009 - 07:22 AM.

Cheers,Sean.See my other UDFs:SAP UDF - Automate SAPJava UDF - Automate Java Applications & AppletsTesseract (OCR) UDF - Capture text from applications, controls and the desktopTextract (OCR) UDF - Capture text from applications and controlsFileSystemMonitor UDF - File, Folder, Drive and Shell MonitoringVLC (Media Player) UDF - Creating and controlling a VLC control in AutoITGoogle Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoITSAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBoxeBay UDF - Automate eBay using the eBay APIChildProc (Parallel Processing) UDF - Parallel processing functions for AutoITHyperCam (Screen Recording) UDF - Automate the HyperCam screen recorderTwitter UDF - Automate Twitter using OAuth and the Twitter APIcURL UDF - a UDF for transferring data with URL syntaxSee my other Tools:Rapid Menu Writer - Add menus to DVDs in secondsTV Player - Automates the process of playing videos on an external TV / MonitorRapid Video Converter - A tool for resizing and reformatting videosRapid DVD Creator - Convert videos to DVD fast and for freeZapPF - A tool for killing processes and recycling filesSean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoITSean's GUI Inspector - A scripting tool for querying GUIsTransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey PlannerAutomate Qt and QWidgetsBrisbane City Council Event Viewer - See what's going on in Brisbane, Australia

#19 seangriffin

seangriffin

    Polymath

  • Active Members
  • PipPipPipPip
  • 223 posts

Posted 17 March 2009 - 01:54 PM

Released V0.7.

Very small update, mainly to add support for Tesseract UDF 0.6. Also made a small fix to "_JavaAttachAndWait".
Cheers,Sean.See my other UDFs:SAP UDF - Automate SAPJava UDF - Automate Java Applications & AppletsTesseract (OCR) UDF - Capture text from applications, controls and the desktopTextract (OCR) UDF - Capture text from applications and controlsFileSystemMonitor UDF - File, Folder, Drive and Shell MonitoringVLC (Media Player) UDF - Creating and controlling a VLC control in AutoITGoogle Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoITSAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBoxeBay UDF - Automate eBay using the eBay APIChildProc (Parallel Processing) UDF - Parallel processing functions for AutoITHyperCam (Screen Recording) UDF - Automate the HyperCam screen recorderTwitter UDF - Automate Twitter using OAuth and the Twitter APIcURL UDF - a UDF for transferring data with URL syntaxSee my other Tools:Rapid Menu Writer - Add menus to DVDs in secondsTV Player - Automates the process of playing videos on an external TV / MonitorRapid Video Converter - A tool for resizing and reformatting videosRapid DVD Creator - Convert videos to DVD fast and for freeZapPF - A tool for killing processes and recycling filesSean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoITSean's GUI Inspector - A scripting tool for querying GUIsTransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey PlannerAutomate Qt and QWidgetsBrisbane City Council Event Viewer - See what's going on in Brisbane, Australia

#20 ProgAndy

ProgAndy

    You need AutoItObject

  • MVPs
  • 2,508 posts

Posted 17 March 2009 - 04:42 PM

As far as i can see, the JComboBox has a panel as child-item. This panel includes a label for each entry :P Possibly this helps you to add native support without OCR.
*GERMAN* Posted Image [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users