milkmoron Posted July 23, 2018 Posted July 23, 2018 Hi is there a move next function or a way to loop so that the next item in a record is selected? I'm not sure where to start looking in order to find them. I want to click a text link and then do my macros, which I'm already finished with and then make it move to the next record. This is on a web browser it looks like this. The link is a date. I believe the page uses javascript Theres also a button for the bottom and I want it to do a whole date range 1/1/2016 - 7/1/2018
jdelaney Posted July 23, 2018 Posted July 23, 2018 Try functions like: _GUICtrlListView_GetItem _GUICtrlListView_* IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Earthshine Posted July 23, 2018 Posted July 23, 2018 read faq 31 and pick the method of browser control My resources are limited. You must ask the right questions
milkmoron Posted July 23, 2018 Author Posted July 23, 2018 (edited) 25 minutes ago, jdelaney said: Try functions like: _GUICtrlListView_GetItem _GUICtrlListView_* Thanks will look into this. How can I make it import the list from the webpage? 23 minutes ago, Earthshine said: read faq 31 and pick the method of browser control I already know how to control a browser somewhat. I need to figure out how to make the script decide how to do things on its own. Can I use IUI to accomplish this? The links do not appear to have elements to use. I cant find any unique properties with simplespy. Using the simple spy output selects only the first link for each date. Edited July 23, 2018 by milkmoron
jdelaney Posted July 23, 2018 Posted July 23, 2018 (edited) Oh, that's a browser...good information to include on your post. _IE* look into all the ie functions. You'll have to do loops through your DOM objects. No one here will be able to help you without the page source of the surrounding objects. Edited July 23, 2018 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
milkmoron Posted July 23, 2018 Author Posted July 23, 2018 My problem is that the links do not have elements and cant be clicked by _IE functions unless I use the date but there are some entries with the same date so i cant use that. Should I use OCR to do this?
jdelaney Posted July 23, 2018 Posted July 23, 2018 (edited) OCR would be ugly. Again, can't help without the page source. The basics is you loop through each row, find a record by some data within the row, and then get that row's link. Such as, get the table, get the rows (notice plural), loop through rows for specific td with specific text, get the td for your link, get the link. I've been able to select table data by doing a click on the row (tr node), but have automated other apps where you have to click an edit button on the row...it all depends on how your application works. Worst case scenario, get the x/y coords and send a mouseclick at it...last resort, only. Edited July 23, 2018 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
jdelaney Posted July 23, 2018 Posted July 23, 2018 (edited) Try to click the rows first, and see if that works for you..._ieaction with 'focus' will probably help too. You are already able to loop through the records in your script, right? I'd prefer you post the source here if necessary...scrub any sensitive data...you only need to include the source for one or two records. Edited July 23, 2018 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
milkmoron Posted July 23, 2018 Author Posted July 23, 2018 2 minutes ago, jdelaney said: Try to click the rows first, and see if that works for you..._ieaction with 'focus' will probably help too. You are already able to loop through the records in your script, right? I'd prefer you post the source here if necessary...scrub any sensitive data...you only need to include the source for one or two records. I'm not sure where to find the source for the records. The page source is extremely messy and long.
jdelaney Posted July 23, 2018 Posted July 23, 2018 (edited) There are browser 'spy' tools that you can select, and click on the page...it will auto navigate you to the source. send F12 at any browser to see the spy tool (top left button of the new panel that displays). Edited July 23, 2018 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
milkmoron Posted July 23, 2018 Author Posted July 23, 2018 (edited) <body class=" ext-webkit ext-chrome viewport x-border-layout-ct" id="ext-gen41" style="width: 988px;"><div id="south-region-container" class=" viewport-panels x-border-panel" style="left: 18px; top: 719px; width: 952px; height: 30px;"><div id="footercontainer" class=""> This is what shows up. It looks like this is for the whole page though. When I hover over the code the whole screen is highlighted Thats the whole html EDIT: Removed Source Edited July 24, 2018 by milkmoron
jdelaney Posted July 23, 2018 Posted July 23, 2018 oh, it's like an applet inside the browser...You'll have to wait on someone else to help you with that. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
milkmoron Posted July 23, 2018 Author Posted July 23, 2018 (edited) Ah Okay. If nobody can help should I try to do OCR? Edited July 23, 2018 by milkmoron
jchd Posted July 24, 2018 Posted July 24, 2018 Instead of the ugly OCR approach, can't you just use the Export all tab of the applet then process the outcome according to your needs? This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
milkmoron Posted July 24, 2018 Author Posted July 24, 2018 (edited) 17 hours ago, jchd said: Instead of the ugly OCR approach, can't you just use the Export all tab of the applet then process the outcome according to your needs? Doesn't really help because their are multiple instances of the same date and the export all doesn't give anything to make each link unique. I can't think of a way to use export all. It also doesnt show all of the details in the export. So I'd still need to go into the links to get all the info. Whats so ugly about OCR? Is there something like a controlfind fuction that returns the position of the text you search for? Im trying this to search for dates but nothing shows up ControlFocus ("Customer Center", "", "") Local $iPosition = StringInStr("(.*/.*/.*)", "(.*/.*/.*/)") MsgBox($MB_SYSTEMMODAL, "", "The search date first appears at position: " & $iPosition) Edited July 24, 2018 by milkmoron
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