How can i remove one line data after imacros has loop?

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

How can i remove one line data after imacros has loop?

by fdoudou on Wed Sep 21, 2011 2:34 am

Hey,everyone.
Is there any method that imacros can remove the data that has loop?
Here is the code
Code: Select all
VERSION BUILD=7300701 RECORDER=FX
CMDLINE !DATASOURCE amazon.txt
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
TAB T=1
URL GOTO=http://www.amazon.com/
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:site-search ATTR=ID:twotabsearchtextbox CONTENT={{!COL1}}


I want to remove one line data in amazon.txt after imacros every time loop.
Can everyone have a good idea? :lol:
fdoudou
 
Posts: 4
Joined: Mon Sep 19, 2011 1:29 am

Re: How can i remove one line data after imacros has loop?

by Hannes, Tech Support on Wed Sep 21, 2011 5:22 am

You extract some text, but then want to manipulate it before saving?
The beta feature "EVAL" should do the trick.
Cf. http://wiki.imacros.net/iMacros_for_Firefox#Version_History
Hannes, iOpus Support
Hannes, Tech Support
 
Posts: 2120
Joined: Thu Sep 21, 2006 6:27 am

Re: How can i remove one line data after imacros has loop?

by iLoad on Wed Feb 08, 2012 6:14 am

I have the same issue!

I want to edit a text file by removing the 1st line when the imacros has finished playing (I couldn't find out how the EVAL would work on datasource files)

Any other ways to have it done? I'd be glad to have a short javascript for that?
iLoad
 
Posts: 3
Joined: Tue Nov 29, 2011 2:31 am

Re: How can i remove one line data after imacros has loop?

by Tom, Tech Support on Mon Feb 20, 2012 5:58 pm

iMacros itself does not have the ability to update or delete lines within a file. It can only append lines to the file, or delete the whole file (using the FILEDELETE command).
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: How can i remove one line data after imacros has loop?

by Edoctoor on Wed Dec 16, 2015 4:28 pm

Workaround

If your file is very very small; you might try reading the SECOND RECORD and saving the SECOND RECORD into another file name as the first RECORD... and then looping throught the rest of the file until the end.. then deleting the orginal file... of course you will have to redo the process if you want re-read/re-write the file as the orginal file name.. but it might be easier to just adjust your macro to use the new filename.

Best regards
iMacros Version 11.0.246.4051
Browser FireFox 42.0
OS Windows 7 Home Premium - Service Pack 1

Before starting a topic please read the following; thank you!
http://forum.imacros.net/viewtopic.php?f=20&t=3331#p8799
User avatar
Edoctoor
 
Posts: 34
Joined: Sun Nov 29, 2015 12:53 pm


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 5 guests

-->