Jump to content

Recommended Posts

Posted

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

Activity Menu Edited.png

Posted (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 by milkmoron
Posted (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 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.
Posted

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?

Posted (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 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.
Posted (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 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.
Posted
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.

Posted (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 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.
Posted (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 by milkmoron
Posted

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 here
RegExp tutorial: enough to get started
PCRE 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)

Posted (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 by milkmoron

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...