Trying to select the first email in gmail window...

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
cboshdave
Posts: 53
Joined: Fri May 16, 2008 6:11 pm

Trying to select the first email in gmail window...

Post by cboshdave » Thu Jan 27, 2011 3:44 am

One more small problem. I am trying to select the first email in a gmail window. The recorder assumes the following code. Problem is that the FRAME NAME changes each time. So I can't get a fix on the position. Position 2 should get it every time but only in relation to the frame. Thoughts?

Code: Select all

FRAME NAME=cdykm1trwuwh8
TAG POS=2 TYPE=DIV ATTR=TXT:Archive<SP>Report<SP>spam<SP>Delete<SP>Move<SP>to<SP>Inbox*
Thanks!
Dave
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Trying to select the first email in gmail window...

Post by Tom, Tech Support » Thu Jan 27, 2011 6:40 pm

Have you tried specifying a frame number instead of name?

FRAME F=n
Regards,

Tom, iMacros Support
cboshdave
Posts: 53
Joined: Fri May 16, 2008 6:11 pm

Re: Trying to select the first email in gmail window...

Post by cboshdave » Thu Jan 27, 2011 6:42 pm

I did try that this morning. Is that intended to be a relative reference? Since I don't know what Frame it is i tried F=0 and incremented it up thru 5 and got no results.
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Trying to select the first email in gmail window...

Post by Tom, Tech Support » Thu Jan 27, 2011 7:09 pm

I just tried recording a short macro with iMacros for Firefox where I click the checkbox to the left of the first message in my gmail inbox, and I got the following:

Code: Select all

FRAME F=4
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=ID::93 CONTENT=YES
I changed ID::93 to ID:* and it works on playback. Of course the question remains whether or not the frame number can change also?
Regards,

Tom, iMacros Support
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Trying to select the first email in gmail window...

Post by Tom, Tech Support » Thu Jan 27, 2011 7:10 pm

PS - I played the macro in the iMacros 7 Browser and it works also.
Regards,

Tom, iMacros Support
cboshdave
Posts: 53
Joined: Fri May 16, 2008 6:11 pm

Re: Trying to select the first email in gmail window...

Post by cboshdave » Thu Jan 27, 2011 7:58 pm

I tried this and noted that the check box is indeed getting populated. I need to open the emails though. Even when I modify my code to be similar, it runs to completion, but no email is opened. Any more thoughts on this? I really need this to work.
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Trying to select the first email in gmail window...

Post by Tom, Tech Support » Mon Jan 31, 2011 3:31 pm

Hi Dave,

I can open it with a DS CLICK command:

Code: Select all

SET !EXTRACT_TEST_POPUP NO
TAB T=1
FRAME F=4
' Use the checkbox as a relative anchor for where to click
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=ID:* EXTRACT=TXT
SET !VAR1 {{!TAGX}}
' Adjust the X coordinate to the right a little and click
ADD !VAR1 50
DS CMD=CLICK X={{!VAR1}} Y={{!TAGY}}
Regards,

Tom, iMacros Support
cboshdave
Posts: 53
Joined: Fri May 16, 2008 6:11 pm

Re: Trying to select the first email in gmail window...

Post by cboshdave » Mon Jan 31, 2011 3:48 pm

Thank you very much. I knew there had to be a way. I had not used or even read about that strategy yet!

I appreciate it again. Thanks!
Post Reply