Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

What is the correct way to execute an AutoIt3 script in Java?

$
0
0
public static void runScript() throws Exception {                 try {                         ProcessBuilder pb = new ProcessBuilder("C:\\Program Files (x86)\\AutoIt3\\AutoIt3.exe\"", "\"C:\\Users\\Cameron\\workspace\\truecryptgui.au3\"");              Process p = pb.start();                                          System.out.println("Script executed, TrueCrypt volume created!");         }         catch (IOException e) {                 System.out.println("exception happened - here's what I know: ");                 e.printStackTrace();                 System.exit(-1);         }             }    

This is what I have right now, it prompts me with a window to select truecryptgui.au3 manually, however if I run from the cmd ->

 

"C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "C:\Users\Cameron\workspace\truecryptgui.au3" 

 

it functions automatically how I'd like it to.

 

Does anybody know what I'm missing in my Java code to get this to perform correctly?


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>