SkysLastChance Posted October 1, 2019 Share Posted October 1, 2019 (edited) Is it possible to get a collection of the data-clickID? I would like to find the B-1-4-0-0-2-1-1-0-0-1-0-0 and click it. (At least try to click it.) Local $oLinks = _IETagNameGetCollection($oIE,"Div") Local $iNumLinks = @extended Local $sTxt = $iNumLinks & " links found" & @CRLF & @CRLF For $oLink In $oLinks $sTxt &= $oLink & @CRLF Next MsgBox($MB_SYSTEMMODAL, "Text:", $sTxt) ClipPut($sTxt) I use this but $oLink.classname or $oLink.id are not working. Edited October 4, 2019 by SkysLastChance You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott Link to comment Share on other sites More sharing options...
Subz Posted October 1, 2019 Share Posted October 1, 2019 Maybe something like: #include <IE.au3> Local $oIE = _IECreate("www.domain.com") _IELoadWait($oIE) Local $oDivs = _IETagNameGetCollection($oIE, "div") Local $sTxt = @extended & " divs found" & @CRLF & @CRLF For $oDiv In $oDivs If $oDiv.ClassName = "wp1ImageRef" Then $sTxt &= $oDiv.GetAttribute("data-clickId").value EndIf Next MsgBox($MB_SYSTEMMODAL, "Text:", $sTxt) ClipPut($sTxt) Link to comment Share on other sites More sharing options...
MagnumXL Posted October 2, 2019 Share Posted October 2, 2019 It might already be telling you the coordinates to click at. See the "-427px" and "-48px" and the "width: 20px" and "height: 16px". Attempt clicking at -417, -40. If that fails perhaps try appending the url that starts with "images/" to the base url and navigate to that. Link to comment Share on other sites More sharing options...
SkysLastChance Posted October 2, 2019 Author Share Posted October 2, 2019 @Subz Your code is finding the div's but it is not displaying any values for me. Any idea why that might be? You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott Link to comment Share on other sites More sharing options...
Nine Posted October 2, 2019 Share Posted October 2, 2019 (edited) There a space in front of " wp1ImageRef". Edited October 2, 2019 by Nine Earthshine 1 “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...
Earthshine Posted October 2, 2019 Share Posted October 2, 2019 nice catch My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
SkysLastChance Posted October 2, 2019 Author Share Posted October 2, 2019 Oddly enough. Either way I am getting the same results as above. 😕 You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott Link to comment Share on other sites More sharing options...
Nine Posted October 2, 2019 Share Posted October 2, 2019 (edited) Try StringInStr. I don't know maybe there's 2 spaces, or some other chars. Edit : I do not believe you need to have .value with .getAttribute. In any case insert some ConsoleWrite, so you know if the right .className is found... Edited October 2, 2019 by Nine SkysLastChance 1 “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...
Subz Posted October 2, 2019 Share Posted October 2, 2019 Sorry wrote it on the fly as I was in the middle of something, Nine is correct, just add the space and remove the .value and it should work (worked on a test file I created anyway). #include <IE.au3> Local $oIE = _IECreate("www.domain.com") _IELoadWait($oIE) Local $oDivs = _IETagNameGetCollection($oIE, "div") Local $sTxt = @extended & " divs found" & @CRLF & @CRLF For $oDiv In $oDivs If $oDiv.ClassName = " wp1ImageRef" Then $sTxt &= $oDiv.GetAttribute("data-clickId") EndIf Next MsgBox($MB_SYSTEMMODAL, "Text:", $sTxt) ClipPut($sTxt) SkysLastChance 1 Link to comment Share on other sites More sharing options...
SkysLastChance Posted October 4, 2019 Author Share Posted October 4, 2019 Thank you for the help! I went with. Local $oDivs = _IETagNameGetCollection($oIE, "div") Local $sTxt = @extended & " divs found" & @CRLF & @CRLF For $oDiv In $oDivs If StringStripWS($oDiv.ClassName,3) = "wplImageRef" Then $sTxt &= $oDiv.GetAttribute("data-clickId") EndIf Next MsgBox($MB_SYSTEMMODAL, "Text:", $sTxt) ClipPut($sTxt) You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott 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