I have a few questions:
BACKGROUND
I am using Oracle Application Testing Suite's OpenScript 13 (Eclipse IDE), Oracle Java 6, and AutoIt.
My goal is to access a given Internet Explorer browser window (`$ieTitle`), send the keystroke of "shift-control-s" for "Save As" functionality to be invoked, so that I can download a (PDF) file to a given location ($fileName).
The code within the script `DownloadPdfFile.au3` is
$ieTitle = $CmdLine[1]
$ieControl = "AVL_AVView31"
$fileName = $CmdLine[2]
ControlFocus($ieTitle, "", $ieControl)
ControlSend($ieTitle, "", $ieControl, "+^s")
; Save as dialog
$winTitle = "Save As"
; wait for Save As window
WinWait($winTitle)
; activate Save As window
If Not WinActive($winTitle) Then WinActivate($winTitle)
ControlFocus($winTitle,"","Edit1")
ControlSetText($winTitle,"","Edit1",$fileName)
Sleep(2000)
ControlClick($winTitle,"","Button3")
Exit 0
So I compiled it with SciTE-Lite (32-bit Version 4.4.6 , creating `DownloadPdfFile.exe`, and so within my Java code, I have
String command = autoItExePath + " " + scriptPath + " \"" + winTitle + "\" " + directoryPath.toFile().toString() + "\\Form9Report" + sdf_ddmmmyyyy.format(new Date()) + ".pdf";
try {
Process process = Runtime.getRuntime().exec(command);
process.waitFor();
} catch (Exception e) {
logger.error("Exception " + e.getMessage(), e);
}
The output would be like `C:\Program Files (x86)\AutoIt3\AutoIt3.exe C:\...\AutoItScripts\DownloadPdfFile.au3 "https://****.com/****.exe?temp_id=**** - Internet Explorer" C:\...\Report05Apr2022.pdf"` which does run without the $cmdLine successfully.
When executed by Java, I see in the taskbar an icon, which I right-click has "[Check] Script Paused" and "Exit".
Questions:
(1) How do I unpause the script?
(2) How do I avoid having the script paused?
Any help is appreciated.