Extracting TAGX and TAGY

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
el_pablo
Posts: 3
Joined: Mon Nov 24, 2008 11:58 pm

Extracting TAGX and TAGY

Post by el_pablo » Tue Dec 09, 2008 10:46 pm

How can I extract the position of an HTML element? I want to do so, because I have an AJAX issue. The only way to know that if a page finished loading is with the position of a button.

I'm working in c#.

Thanx
User avatar
Tech Support
Posts: 4947
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: Extracting TAGX and TAGY

Post by Tech Support » Fri Dec 12, 2008 11:32 pm

In the macro please use:

Code: Select all

ADD !EXTRACT {{!TAGX}}
ADD !EXTRACT {{!TAGY}}
In the code please use:

Code: Select all

i = iim1.iimPlay ("macro name")
x =  iim1.iimGetLastExtract (1) 
Y =  iim1.iimGetLastExtract (2) 
techimac
Posts: 373
Joined: Fri Feb 20, 2015 9:27 pm

Re: Extracting TAGX and TAGY

Post by techimac » Mon Feb 08, 2021 6:26 pm

https://wiki.imacros.net/!TAGX

whats the command for iMacros 8.9.7?
Available for custom iim, javascript iMacros scripts
Tom, Tech Support
Posts: 3645
Joined: Mon May 31, 2010 4:59 pm

Re: Extracting TAGX and TAGY

Post by Tom, Tech Support » Fri Feb 19, 2021 1:33 pm

techimac wrote:
Mon Feb 08, 2021 6:26 pm
https://wiki.imacros.net/!TAGX

whats the command for iMacros 8.9.7?
Hi techimac,

There currently is no equivalent for !TAGX or !TAGY in iMacros for Firefox or Chrome.
Regards,

Tom, iMacros Support
techimac
Posts: 373
Joined: Fri Feb 20, 2015 9:27 pm

Re: Extracting TAGX and TAGY

Post by techimac » Fri Feb 19, 2021 2:46 pm

I found this
getBoundingClientRect()

It can be used to get X,Y
Available for custom iim, javascript iMacros scripts
Tom, Tech Support
Posts: 3645
Joined: Mon May 31, 2010 4:59 pm

Re: Extracting TAGX and TAGY

Post by Tom, Tech Support » Fri Feb 19, 2021 4:35 pm

techimac wrote:
Fri Feb 19, 2021 2:46 pm
I found this
getBoundingClientRect()

It can be used to get X,Y
Excellent, thanks for the update!
Regards,

Tom, iMacros Support
techimac
Posts: 373
Joined: Fri Feb 20, 2015 9:27 pm

Re: Extracting TAGX and TAGY

Post by techimac » Fri Feb 19, 2021 4:49 pm

You are welcome
Available for custom iim, javascript iMacros scripts
techimac
Posts: 373
Joined: Fri Feb 20, 2015 9:27 pm

Re: Extracting TAGX and TAGY

Post by techimac » Fri Feb 19, 2021 4:52 pm

Example code

Code: Select all

var a = window.document.getElementById("abc"); 
var r = a.getBoundingClientRect(); 
x = r.left; 
y = r.top;
Available for custom iim, javascript iMacros scripts
Post Reply