oemript Posted April 30, 2019 Author Share Posted April 30, 2019 (edited) Thanks, to everyone very much for suggestions (^v^) Edited May 1, 2019 by oemript Link to comment Share on other sites More sharing options...
oemript Posted May 1, 2019 Author Share Posted May 1, 2019 Referring to following image, I would like to know on how to export row 0 into text file as well. Do you have any suggestions? Thanks, to everyone very much for any suggestions (^v^) #include <IE.au3> #include <array.au3> #include <File.au3> $oIE = _IECreate("https://www.cmegroup.com/trading/interest-rates/countdown-to-fomc.html") _IENavigate($oIE, "https://cmegroup-tools.quikstrike.net/User/QuikStrikeView.aspx?viewitemid=IntegratedFedWatchTool") $oTag = _IEGetObjById ($oIE, "ctl00_MainContent_ucViewControl_IntegratedFedWatchTool_uccv_lvMeetings_ctrl3_lbMeeting") _IEAction ($oTag, "click") _IELoadWait ($oIE, 5000) $oTable = _IETableGetCollection($oIE, 4) ;$oTable = _IETableGetCollection($oIE,0) $aData = _IETableWriteToArray($oTable) _ArrayDisplay($aData) _FileWriteFromArray("C:\temp\txt.txt" , $aData,1) Link to comment Share on other sites More sharing options...
Danp2 Posted May 1, 2019 Share Posted May 1, 2019 read the help file on _FileWriteFromArray and then adjust your script accordingly. 😇 oemript and FrancescoDiMuro 1 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
oemript Posted May 1, 2019 Author Share Posted May 1, 2019 Thanks, to everyone very much for suggestions (^v^) Link to comment Share on other sites More sharing options...
oemript Posted May 4, 2019 Author Share Posted May 4, 2019 (edited) Referring to following image, I would like to know on how to retrieve the date as shown below, there is no date information within arraydisplay. Do you have any suggestions? Thanks, to everyone very much for any suggestions (^v^) Edited May 4, 2019 by oemript Link to comment Share on other sites More sharing options...
Danp2 Posted May 4, 2019 Share Posted May 4, 2019 8 hours ago, oemript said: I would like to know on how to retrieve the date as shown below, there is no date information within arraydisplay. Do you have any suggestions? Post your code. Otherwise, we can only make wild guesses about what you are doing. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
oemript Posted May 4, 2019 Author Share Posted May 4, 2019 Please see following coding as shown below. Do you have any suggestions? Thanks, to everyone very much for any suggestions (^v^) #include <IE.au3> #include <array.au3> #include <File.au3> $oIE = _IECreate("https://www.cmegroup.com/trading/interest-rates/countdown-to-fomc.html") _IENavigate($oIE, "https://cmegroup-tools.quikstrike.net/User/QuikStrikeView.aspx?viewitemid=IntegratedFedWatchTool") $oTag = _IEGetObjById ($oIE, "ctl00_MainContent_ucViewControl_IntegratedFedWatchTool_uccv_lvMeetings_ctrl3_lbMeeting") _IEAction ($oTag, "click") _IELoadWait ($oIE, 5000) $oTable = _IETableGetCollection($oIE, 4) ;$oTable = _IETableGetCollection($oIE,0) $aData = _IETableWriteToArray($oTable) _ArrayDisplay($aData) _FileWriteFromArray("C:\temp\txt.txt" , $aData,1) Link to comment Share on other sites More sharing options...
Nine Posted May 4, 2019 Share Posted May 4, 2019 @oemript At the stage you are now, you should be able to resolve this very small problem by yourself. When there is text at the end of a tag, it is called .innertext. You already got the object in $oTag. So just save the text into a variable and write it to the file or copy it somewhere in the array (there is empty spaces) before you write the array to the file. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
oemript Posted May 5, 2019 Author Share Posted May 5, 2019 I try following coding, but it displays nothing within dialog box. MsgBox($MB_SYSTEMMODAL, "InnerText",$oTag.InnerText) Do you have any suggestions on how to retrieve innerText properly? Thanks, to everyone very much for any suggestions (^v^) Link to comment Share on other sites More sharing options...
Danp2 Posted May 5, 2019 Share Posted May 5, 2019 It's a link, so it doesn't have an innertext attribute. Use "text" or "textContent" instead. P.S. You should really learn to figure this stuff out on your own using the browser's developer tools. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
oemript Posted May 5, 2019 Author Share Posted May 5, 2019 When I search for help with " text " or " textContent", there is no related function for AutoIT. Could you please provide any example on how to do that? Do you have any suggestions? Thanks, to everyone very much for any suggestions (^v^) Link to comment Share on other sites More sharing options...
Danp2 Posted May 5, 2019 Share Posted May 5, 2019 23 minutes ago, oemript said: When I search for help with " text " or " textContent", there is no related function for AutoIT. Those aren't Autoit commands / functions. They are properties of the link element. See here for more details. My suggestion was to use one of them in place of "innertext". Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
oemript Posted May 5, 2019 Author Share Posted May 5, 2019 I try following approach without luck MsgBox($MB_SYSTEMMODAL, "InnerText", _IEPropertyGet($oTag, "innertext")) MsgBox($MB_SYSTEMMODAL, "InnerText", $oTag.innertext) MsgBox($MB_SYSTEMMODAL, "InnerText", $oTag.text) Do you have any suggestions on what is the proper format to retrieve innertext? Thanks, to everyone very much for any suggestions (^v^) Link to comment Share on other sites More sharing options...
Nine Posted May 5, 2019 Share Posted May 5, 2019 (edited) Tested it with both .text AND .innerText and both are working fine. But you need to grab it BEFORE you click on it, because the context changes after the click. Really you need to experiment a minimum when we tell you something, it wasn't so hard to find ... Edited May 5, 2019 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
oemript Posted May 5, 2019 Author Share Posted May 5, 2019 (edited) It works, now Thanks, to everyone very much for suggestions (^v^) Edited May 5, 2019 by oemript Link to comment Share on other sites More sharing options...
oemript Posted May 5, 2019 Author Share Posted May 5, 2019 (edited) Done Edited May 5, 2019 by oemript Link to comment Share on other sites More sharing options...
Danp2 Posted May 5, 2019 Share Posted May 5, 2019 32 minutes ago, oemript said: ERROR Message --> IE.au3 T3.0-2 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (ctl00_MainContent_ucViewControl_IntegratedFedWatchTool_uccv_lvMeetings_ctrl6_lbMeeting) "D:\Sample.au3" (13) : ==> Variable must be of type "Object".: MsgBox($MB_SYSTEMMODAL, "Text : ", $i & " : " & $oTag.text) MsgBox($MB_SYSTEMMODAL, "Text : ", $i & " : " & $oTag^ ERROR Have you tried using IsObj()? That seems like an obvious choice to me. 🤨 oemript 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
oemript Posted May 5, 2019 Author Share Posted May 5, 2019 It works with If Not IsObj($oTag) Then Thanks, to everyone very much for suggestions (^v^) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now