Jump to content

Release: JNAutoIt - Java Native Access for AutoIt


midorlo
 Share

Recommended Posts

Hello,

I needed AutoIt in a "mostly"-Java project (don't ask ..) and decided to wrap the .dll via Java Native Access. It went suprisingly well so I decided to share my results with you guys. You can fork/download the project and it's sources via Github. Feedback is always apprechiated (ideally on github, but I'll try to also check this topic from time to time).

 

PS: Since I'm not really an active member of this community, I encourage the mods to state any formal problems with this topic.

Edited by midorlo
Link to comment
Share on other sites

  • 5 years later...

@midorlo

Hi midori, first of all thx for the JNA AutoIt implementation.
I trying to use it in one java project for testing Windows programs. I have created simple java main class in the Eclipse for testing.

My environment is: Windows 10, JDK 1.8, last Autoit 3.3.16.1


I started testing by running notepad.exe

aix.AU3_Run(new WString("notepad.exe"), new WString("C:\\Windows"), 1);


It start the program, can did click by coordinates, can sent text aix.AU3_Send(new WString("test autoit"));
but, there is no way to click on control "Editar" with aix.AU3_ControlClick

aix.AU3_ControlClick(
                new WString("*test autoit: Bloc de notas")
                ,new WString("")
                ,new WString("[CLASS:Windows.UI.Composition.DesktopWindowContentBridge; INSTANCE:4]")
                ,null
                ,1
                );


I have tryed control click by CLASSNN and Coordinates too.

image.thumb.png.11ae796eec243149ab57a125a616777a.png

Nothing is working and I even dont know where to get the error logging.
I have seen that I can click the button by key combination:

aix.AU3_Send(new WString("!e"), 0);

But I need to work the function ControlClick for click on other buttons and programs.

Also, I tryed to run others programs and was sorpriced that they even doesnt start!  

aix.AU3_Run(new WString("WINWORD.EXE"), new WString("C:\\Program Files\\Microsoft Office\\root\\Office16"), 1);


and
 

aix.AU3_Run(new WString("CCleaner64.exe"), new WString("C:\\Program Files\\CCleaner"), 1);

Now Im really confused and dont now what to do... Why I can't start others programs? Some permissions?


I really appresiate any clue or help.

Thx.

 

Link to comment
Share on other sites

On 8/30/2018 at 5:51 PM, midorlo said:

PS: Since I'm not really an active member of this community, I encourage the mods to state any formal problems with this topic.

1 hour ago, grande said:

Hi midori,

...you'll have better luck finding him at https://github.com/midorlo/midorlo

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

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...