Jump to content

oemript

Active Members
  • Posts

    336
  • Joined

  • Last visited

Everything posted by oemript

  1. I would like to know on whether AutoIT gets any feature or not to record action, just like Excel's recording macro feature. Does anyone have any suggestions? Thanks in advance
  2. Referring to following link and image, There are other frame to prevent directly accessing the text contents. Can AutoIT script retrieve text from web page? Thanks for any suggestions https://www.barchart.com/options/most-active/stocks
  3. It works now after changing Sleep(10000), maybe the network traffic issue. Thanks everyone for any help
  4. Yes, but the code is missing Step 1 before Step 2 Step 1 - Locating text " Income Statement " as object, Pass Step 2 - Locating button " Export to Excel " as object, Pass Thanks for any help
  5. Please see attached image and codes I am little confused on what object should be grabbed for locating clicking action. Step 1 - Locating text " Income Statement " as object, Pass Step 2 - Locating button " Export to Excel " as object, Pass Step 3 - Locating label " Balance Sheet " as object, but Fail Any suggestions on what object should be grabbed for "Balance Sheet "? Thanks for any help Local $sURL = "https://www.morningstar.com/stocks/xnas/goog/financials" ;Step 1 - Click Income Statement 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 When I grab the label Object Class and search for " Balance Sheet ", it fails, what object should be grab in order to switch into "Balance Sheet"? Local $sText = " Balance Sheet ", $bFound = False Local $oLabels = _IETagNameGetCollection($oIE, "label") For $oLabel In $oLabels If $oLabel.InnerText = $sText Then $bFound = True $oLabel.click() ExitLoop EndIf Next 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
  6. Referring to following images, should I use classname "mds-link ng-binding" as object to be clicked on the first step? I try both coding and fail to clicking button "Income Statement", furthermore, when I right click the object "Income Statement" for inspect, but I cannot find classname "sal-financials-details_export mds-button mds_button--small" by searching, on the other hands, " Income Statement " is not an object for selection, so clicking action on "Income Statement" cannot be performed, Do you have any suggestions on what wrong it is? Thanks for any help
  7. I get no idea on how to grab the object "Export to Excel" and click it and save the file. I would like to know on how AutoIT handles this process. Thanks for any help #include <IE.au3> #include <WinAPIFiles.au3> #include <File.au3> _IEErrorNotify(True) Global $oGlobalCOMErrorHandler = ObjEvent("AutoIt.Error", "_ErrFuncGlobal") ; Global COM error handler Global $Init_Time = TimerInit() ;AdlibEnable("Check_Running_Time") Local $i = 0 Local $sSearch = "" Local $sURL = FileReadLine("https://www.morningstar.com/stocks/xnas/goog/financials", 1) Global $oIE = _IECreate($sURL) _IELoadWait($oIE, 2000, 3000) _IENavigate($oIE, "javascript:SRT_stocFund.Export()") How to grab the object "Export to Excel" and click it and save the file? Sleep(5000) _IEQuit($oIE)
  8. Referring to following link and image, can AutoIT script click button on web? Thanks for any suggestions https://www.morningstar.com/stocks/xnas/goog/financials
  9. If I want to scrape the text, but don't know on how to handle the text structure. Do you have any suggestions on what kind of language it is and what kind of forum I should go? Thanks, to everyone very much for any suggestions (^v^)
  10. Referring to following link, I would like to know on how to retrieve the text using AutoIT. #include <IE.au3> ; Create a constant variable in Local scope of the filepath that will be read/written to. ; Local Const $sFilePath = _WinAPI_GetTempFileName(@TempDir) Local $oIE = _IECreate("https://www.barchart.com/stocks/quotes/AA/options?expiration=2020-01-10") How to locate "Call Open Interest Total" and retrieve 44? How to locate "Put Open Interest Total" and retrieve 35? Does anyone have any suggestions? Thanks in advance for any suggestions
  11. You waste of my time
  12. I do my effort to test the code always, if each member needs to resolve his question by himself, this forum is no need to exist anymore, would it be correct?
  13. I have tested the coding, you mention that issue was not related to my current issue. Would it be a threat to member for better not asking any question under this forum?
  14. For given file with 7kb, FileGetSize return 0 and I would like to know on what unit FileGetSize do in return. $size = FileGetSize($sFilePath) Does anyone have any suggestions? Thanks in advance for any suggestions
  15. Thank you very much for suggestions (^v^)
  16. Referring to following link, after running following coding, I get following error message, I would like to know on what wrong it is and how to fix it Global $oIE = _IECreate($sURL) Does anyone have any suggestions? Thanks in advance for any suggestions ERROR Message --> IE.au3 T3.0-2 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
  17. Referring to following image, I would like to know on where to download Script Recorder. Folder is not available for v3.3.14.5 : Installed Folder / Extra / Recorder Does anyone have any suggestions? Thanks in advance for any suggestions
  18. Referring to following image, Error occur before 3, but it never goes to 4 and stop. I would like to know on how to manage error handle in case of any error, so it would jump to error section to perform _IEQuit($oIE). Does anyone have any suggestions? Thanks in advance for any suggestions Local $sURL = "https://financials.morningstar.com/ratios/r.html?t=0P00009ROZ&culture=en&platform=sal" Do While ProcessExists("iexplore.exe") ProcessClose("iexplore.exe") WEnd ; 1 ConsoleWrite ( "1" ) Global $oIE = _IECreate($sURL) ConsoleWrite ( "2" ) _IELoadWait($oIE, 5000) ConsoleWrite ( "3" ) Local $oID = _IEGetObjById($oIE, "star_span") ConsoleWrite ( "4" ) If @error Then ConsoleWrite ( "5" ) ContinueLoop ConsoleWrite ( "6" ) MsgBox($MB_SYSTEMMODAL, "", "An error occurred whilst writing the temporary file.") ConsoleWrite ( "7" ) _IEQuit($oIE) ConsoleWrite ( "8" ) EndIf $i = $i + 1 Until $i > 50
  19. After READ and THINK and CHECK then SOLVED. Thanks, to everyone very much for suggestions (^v^)
  20. Thanks, to everyone very much for suggestions (^v^)
  21. Solved
  22. I would like to know on why _IEQuit($oIE) cannot be executed in case of error and still display error as shown below: "C:\Program Files (x86)\AutoIt3\Include\IE.au3" (1900) : ==> The requested action with this object has failed.: If IsObj($oObject.document.getElementById($sID)) Then If IsObj($oObject.document^ ERROR After adding Global COM Error, I would like to know on what 1900 is about. Do you have any suggestions? Thank you very much for any suggestions (^v^) #include <IE.au3> Global $oGlobalCOMErrorHandler = ObjEvent("AutoIt.Error", "_ErrFuncGlobal") ; Global COM error handler While ProcessExists("iexplore.exe") ProcessClose("iexplore.exe") WEnd ; 6886 Global $oIE = _IECreate("https://financials.morningstar.com/ratios/r.html?t=0P0001648D&culture=en&platform=sal") Local $hIE = WinGetHandle("[Class:IEFrame]") Local $sSearch = "NIL" Local $oID = _IEGetObjById($oIE, "star_span") if @error then ContinueLoop _IEQuit($oIE) else WinActivate($hIE) If StringInStr($oID.ClassName, "r_star0") Then $sSearch &= 0 If StringInStr($oID.ClassName, "r_star1") Then $sSearch &= 1 If StringInStr($oID.ClassName, "r_star2") Then $sSearch &= 2 If StringInStr($oID.ClassName, "r_star3") Then $sSearch &= 3 If StringInStr($oID.ClassName, "r_star4") Then $sSearch &= 4 If StringInStr($oID.ClassName, "r_star5") Then $sSearch &= 5 MsgBox(32, "Search Items", $sSearch ) endif ; Global COM error handler Func _ErrFuncGlobal($oError) ; Do anything here. ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> Global COM error handler - COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_ErrFunc
  23. Referring to following image, I have already added 5 seconds to wait and still get error (showing error for sixth / seventh items within loop) would like to know on what wrong it is and how to handle it property. Web page is loaded successfully, Do you have any suggestions? Thank you very much for any suggestions (^v^) Global $oIE = _IECreate("https://financials.morningstar.com/ratios/r.html?t=0P00009ROZ&culture=en&platform=sal") _IELoadWait($oIE, 5000) Local $sSearch = "" Local $oID = _IEGetObjById($oIE, "star_span")
  24. I am deeply appreciate everyone kindness for sharing
×
×
  • Create New...