Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/21/2020 in all areas

  1. Version 0.2024.9.16

    5,392 downloads

    This is @Yashied's most excellent control viewer, modified by me, based on the code @boomingranny posted. There are 2 forum entries, one shows active and the other depreciated, and not seen @Yashied since March 2016, so I feel is OK to post this, tho, i'd take it down upon request. PS: Do run as Admin if available, as it may not do what you need without the rights.
    1 point
  2. 1 point
  3. Go to function at the end of the script instead of exiting If you really want this, please check OnAutoItExitRegister function in AutoIt SciTE's Help file
    1 point
  4. I can confirm that Danp2 code is working fine, but there was an invalid character after copy/paste. Maybe SonyStyle has the same problem. To delete those bad characters, in Scite, go to menu File/Encoding and select Code Page Property. You should now be able to see them, just simply delete them. While we are here I added the code I use to save file, so here you go : #include <IE.au3> Local $sURL = "https://www.morningstar.com/stocks/xnas/goog/financials" Local $sText = " Income Statement " Local $oIE = _IECreate($sURL) Sleep(6000) _IELinkClickByText($oIE, $sText) Sleep(6000) Local $sText = " Export to Excel ", $bFound = False Local $oButtons = _IETagNameGetCollection($oIE, "button") For $oButton In $oButtons If $oButton.InnerText = $sText Then $bFound = True $oButton.click() ExitLoop EndIf Next If Not $bFound Then Exit MsgBox($MB_SYSTEMMODAL, "", "Export button not found") Sleep(5000) Local $hIE = _IEPropertyGet($oIE, "hwnd") Local $hCtrl = ControlGetHandle($hIE, "", "[CLASSNN:DirectUIHWND1]") ControlSend($hIE, "", $hCtrl, "{TAB}") Sleep(350) ControlSend($hIE, "", $hCtrl, "{DOWN}") ; this does work once the save button is focussed ControlSend($hIE, "", $hCtrl, "s") Local $sFile = @ScriptDir & "\Test.xls" FileDelete($sFile) Local $hWnd = WinWait("[CLASS:#32770]", "", 5) If Not $hWnd Then Exit MsgBox($MB_SYSTEMMODAL, "", "Timeout on Save As Window") Sleep(1000) ControlSetText($hWnd, "", "Edit1", $sFile) ControlClick($hWnd, "", "[CLASSNN:Button1]") For $i = 1 To 25 ConsoleWrite(FileGetSize($sFile) & @CRLF) If FileGetSize($sFile) Then ExitLoop Sleep(200) Next _IEQuit($oIE)
    1 point
  5. This works for me to find / click the desired button -- #include <IE.au3> Local $sURL = "https://www.morningstar.com/stocks/xnas/goog/financials" Local $sText = " Income Statement " Local $oIE = _IECreate($sURL) Sleep(5000) _IELinkClickByText($oIE, $sText) Sleep(5000) $sText = " Export to Excel " Local $oButtons = _IETagNameGetCollection ($oIE, "button") For $oButton in $oButtons If $oButton.InnerText = $sText Then ConsoleWrite("Button found!" & @crlf) $oButton.click() ExitLoop EndIf Next
    1 point
×
×
  • Create New...