Jump to content

Sachs

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Sachs's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. My SciTE-Lite Version 4.4.6 (32-bit) code Local $fileName = $CmdLine[1] WinWait("Save As") If Not WinActive("Save As") Then WinActivate("Save As") ControlFocus("Save As", "", "Edit1") ControlSetText("Save As", "", "Edit1", $fileName) ConsoleWrite("Saving file to " & $fileName & @CRLF) Sleep(2000) ControlClick("Save As", "", "Button2")  I am running this from SciTE-Lite against Chrome v103.0.5060.134 (Official Build) (64-bit) The "Save As" dialog is up, and I see the existing text within the "Edit1" is highlighted, but that's all that is happening. I have tried $sText = ControlGetText("Save As", "", "Edit1") which returns what's there, so AutoIt does see the control. I have also tried "Send()", "ControlSend", and not getting anywhere. As well as, "ControlClick()" doesn't work either. If I do Local $rc = ControlClick("Save As", "", "Button2") ConsoleWrite("Return Value is " & $rc & @CRLF) Outputs: "Return Value is 1", and "1" is supposed to be "Success". Not sure why I am this trouble. Can someone help me get this to work correctly? Just trying to enter the file name into the field, and press the "Save" button.
  2. Hello there, I have come across a situation where a file is automatically downloaded, but the browser has a notification bar at the bottommost of the screen, where one is given the options of "Keep", "Discard", "Show All", and "X". When I tried to use the AutoIt Window Info, there isn't any information on the notification bar itself, only the main window of the browser. Does anyone have any suggestions to deal with the notification bar/popup with "Keep" and "Discard"? Thanks.
  3. Thanks. There isn't any icon in the taskbar, but the script itself, is still not fully executing. I cannot see the "Save As" functionality happen.
  4. 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.
×
×
  • Create New...