read file and paste ?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
carkons
Newbie
Posts: 16
Joined: Wed Jul 27, 2011 12:33 am

read file and paste ?

Post by carkons » Wed Jul 27, 2011 12:40 am

hi everybody,i searched my problem but i didnt find sorry.also sorry about my english.its not good


i need to small ms macro.there is a one webpage and i have 3 txt files.
(1.txt,
2.txt,
3.txt)
program will be read first txt (its 50 lines) and open this webpage paste the txt files the form and click the send button.after 5 minutes it will be read 2.txt .... its continue....

i mean copy txt files and open webpage paste and send ....after 5 minutes use same steps for 2.txt

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Thu Jul 28, 2011 1:55 pm

I didn't do ALL your homework for you..... but this sample should show you how to do it. The sample opens a text file with just one line, and pastes that line into Google then does a search on that.

You can build upon this sample to open multiple web pages and paste multiple lines of text. Waiting 5 minutes is simple..... just use the wait>
command. 5 minutes = 300 seconds.

Code: Select all

//
//  make c:\test.txt file
//  put only the following one line in it
//
//  Macro Scheduler
//



//open web page
  ExecuteFile>http://www.google.com
  Wait>5

//read file 1
  Let>k=1
Label>start
  ReadLn>c:\test.txt,k,line
  If>line=##EOF##,finish
  //copy to clipboard
  PutClipBoard>line
  SetFocus>Google - Windows Internet Explorer
  Wait>1
  //paste text into web page from clipboard
  Press Ctrl
  Send>v
  Release Ctrl
  Wait>0.05
  //submit search to google
  Press Enter
  Let>k=k+1
  Goto>start
Label>finish



carkons
Newbie
Posts: 16
Joined: Wed Jul 27, 2011 12:33 am

Post by carkons » Thu Jul 28, 2011 7:53 pm

thanksss

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts