How to Clear Cells?

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
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
Stuart
Posts: 2
Joined: Wed Feb 08, 2006 5:01 pm

How to Clear Cells?

Post by Stuart » Wed Feb 08, 2006 5:19 pm

Hi,

I have the scripting version of Internet Macro's and am running version 5.02

I keep running into the same issue when when designing macro's with IM, and want to see if there is a way around it.

The issue is simple.

Consider the following example:

Take a look at the homepage for iopus ie http://www.iopus.com

In the top right hand corner it has a text box (which happens to be collecting emails), and in it is the text 'your E-mail here'.

Now, if I design a macro that pulls from a csv file to automatically fill in a box that ALREADY has text in it, then the original text is NOT overwritten.

I have tried recording from within the Internet Macro browser, but it never records deleting the contents of a cell, and THEN inserting the new value from a csv file.

It just records the inserting. So inevitably, it means that IM is useless for changing existing data.

Is there any way of doing this? (ie deleting the contents of a cell, so that a new value can be put inside?)

If anyone has a code example of how to do this than that would be good. Or maybe tech support could jump in here and tell me how (or if) this can be accomplished?

Thanks for your help,

Stuart
mknoll1
Posts: 174
Joined: Fri Dec 23, 2005 4:14 pm

Post by mknoll1 » Wed Feb 08, 2006 8:57 pm

VERSION BUILD=4210207
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://www.iopus.com/
SIZE X=876 Y=629
WAIT SECONDS=3
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:Inputform ATTR=NAME:subscribe_email CONTENT=emailaddress@email.com
TAG POS=1 TYPE=INPUT:IMAGE FORM=NAME:Inputform ATTR=NAME:&&VALUE:
TAB T=1
WAIT SECONDS=5

This will overwrite the text in the box. In our application we have variables that are set when we run macros so it would be

VERSION BUILD=4210207
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://www.iopus.com/
SIZE X=876 Y=629
WAIT SECONDS=3
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:Inputform ATTR=NAME:subscribe_email CONTENT={{C1}}
TAG POS=1 TYPE=INPUT:IMAGE FORM=NAME:Inputform ATTR=NAME:&&VALUE:
TAB T=1
WAIT SECONDS=5

Whatever was defined as {{C1}} would end up in the box.
Stuart
Posts: 2
Joined: Wed Feb 08, 2006 5:01 pm

Thanks!

Post by Stuart » Wed Feb 08, 2006 11:43 pm

A big thank you for that!

That is going to save me so much time you wouldn't believe! (At least 10 hours in the next day or two)

I looked at the recorded script and yours; and it seemed that the key thing I was missing was the

TAB T=1

Line, between the Tag POS=1 lines. It wouldn't work with the

TAG POS=1 TYPE=INPUT:IMAGE FORM=NAME:Inputform ATTR=NAME:&&VALUE:

Line for some reason? Not sure why? But anyway, just inserting the TAB T=1 made the script work a treat.

Thanks very much!

Regards,

Stuart
Post Reply