Extract & Fill

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
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
jfj3rd
Posts: 43
Joined: Thu Dec 17, 2009 5:23 pm
Location: Riverside CA
Contact:

Extract & Fill

Post by jfj3rd » Fri Mar 19, 2010 5:04 pm

Hello everyone,

I've spent maybe the last hour trying different possibilities and am now giving in and asking for assistance to something that seems like I am doing correctly yet still gettting nowhere.

I am trying to extract the numbers from the following code:

Code: Select all

 <td class=itemrow2 width=80 colSpan=1><span id="lblCRMID">852</span></TD>
I've tried several combinations and the following is what I'm pretty sure should be correct:

Code: Select all

TAG POS=1 TYPE=Span ATTR=ID:lblCRMID:*.* EXTRACT=TXT 
SET !VAR1 {{!EXTRACT}}
I've also tried:

Code: Select all

TAG POS=1 TYPE=TD ATTR=CLASS:itemrow2:*.* EXTRACT=TXT 
SET !VAR1 {{!EXTRACT}}
When I try it this way, I get a completely different fields data in Position 1. Tried moving it to 2, 3, 4, etc and none of them result in the correct data being extracted. It is as if iMacro's doesn't even acknowledge that the td class is assigned to 852.

Any feedback would be highly appreciated.
--

Warmest Wishes,

John F. Jones III
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: Extract & Fill

Post by Daniel, Tech Support » Fri Mar 19, 2010 6:36 pm

Hello,

You were almost right in the 1st example, except for you don't need ":*.*". This works:

Code: Select all

TAG POS=1 TYPE=Span ATTR=ID:lblCRMID EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
PROMPT {{!VAR1}}
Best regards,
Daniel, iOpus Support
jfj3rd
Posts: 43
Joined: Thu Dec 17, 2009 5:23 pm
Location: Riverside CA
Contact:

Re: Extract & Fill

Post by jfj3rd » Thu Mar 25, 2010 6:30 pm

Thanks Daniel!

I figured it out shortly after I posted. Isn't that the way it always works?

Perhaps you'll have a faster answer on something relevant to this though than the iopus support team which I have a ticket into on.

The code mentioned above was expanded on to have 9 variables. The code is exactly the same (working code that is) and yet it gives me an error on !var4

It occured to me that it is probably because I'm on a limitted version as I recalled looking at the different packages and finding that the free one only allows for three variables.

I downloaded the iMacro browser 30 day trial and requested that it be unlocked, to which i've been given my 30 day unlock key. I thought for sure this would help but it did not.

I still have the macro stopping with an error when it reaches the 3rd variable.

Here's the code:

Code: Select all

'Extract Client Details & Store in Variables
'City1
TAG POS=1 TYPE=INPUT ATTR=name:txtCity1&&TXT:* EXTRACT=TXT    
SET !VAR2 {{!EXTRACT}} 
SET !EXTRACT NULL
'City2
TAG POS=1 TYPE=INPUT ATTR=name:txtCity2&&TXT:* EXTRACT=TXT    
SET !VAR3 {{!EXTRACT}} 
SET !EXTRACT NULL
'City3
TAG POS=1 TYPE=INPUT ATTR=id:txtCity3&&TXT:* EXTRACT=TXT    
SET !VAR4 {{!EXTRACT}} 
SET !EXTRACT NULL
Here is the error:

BadParameter: Wrong variable VAR4, line: 22

Line 21, 22 & 23 are:
TAG POS=1 TYPE=INPUT ATTR=id:txtCity3&&TXT:* EXTRACT=TXT
SET !VAR4 {{!EXTRACT}}
SET !EXTRACT NULL
I know I'm not a huge priority to the support team being on the 30 day unrestricted iMacro browser but I have 30 days to prove to Management here that this can reduce mundane tasks that our employees have to do each and every day.

I really need the unlimited variables within Firefox; I'd try to edit the source myself but I'm not that experienced and couldn't find the files either way. I'm hoping your thread on a possible open source plugin for firefox does get pushed through.

Thanks again and in advance.
--

Warmest Wishes,

John F. Jones III
jfj3rd
Posts: 43
Joined: Thu Dec 17, 2009 5:23 pm
Location: Riverside CA
Contact:

Re: Extract & Fill

Post by jfj3rd » Thu Mar 25, 2010 7:43 pm

I'm an idiot!

While browsing through the wiki looking for some other data I came across the pre-defined var1, var2, var3... no var4 and so on. No wonder it isn't working for me; it isn't because of any version of iMacros i'm running! Bah!

Now I'm researching defining custom variables.
--

Warmest Wishes,

John F. Jones III
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: Extract & Fill

Post by Daniel, Tech Support » Fri Mar 26, 2010 9:15 pm

Hi John,

Oh, please, you're smarter than most people out there at least because you figured it out yourself!
I am glad it is working now!

On the other matter - I actually am on the iOpus support team :) And I remember replying to a similar support ticket :) Actually, now I see that I didn't reply to the 2nd question you asked there. I will do shortly.

All the best!
Daniel, iOpus Support
Post Reply