Readln would not work with clipboard

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Leevan
Newbie
Posts: 9
Joined: Sun Jan 27, 2013 4:09 pm

Readln would not work with clipboard

Post by Leevan » Tue Jan 29, 2013 10:40 pm

Hi,

I try to read data from clipboard using Readln, but it does not work.

Code: Select all

GetClipBoard>mydata
Message>mydata
wait>3
Let>k=1
Label>start
ReadLn>mydata,k,line
If>line=##EOF##,finish
Message>line
wait>3
Let>k=k+1
Goto>start
Label>finish
I will get ##NOFILE##, is there any other command I can use to read line in clipboard?

Thanks,

Libei

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Jan 29, 2013 11:30 pm

ReadLn is for reading files.

GetClipboard already gets the clipboard data to a variable.

If you then want to split that data out by lines into an array use the Separate command specifying CRLF as the delimiter and then use a Repeat/Until over the array of lines.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

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