Send> and %CR%

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
D_S
Junior Coder
Posts: 32
Joined: Sun Apr 24, 2005 6:43 pm

Send> and %CR%

Post by D_S » Thu May 15, 2008 3:19 pm

I've been using this product for some time and I don't know what I'd do without it. Usually I've written compiled macros that provide data input to some programs screen. I usually write the code in the usual fashion

Code: Select all

Send>data
wait>1
Press Enter
Send>data2
wait>1
Press Enter
etc
My coworker showed me that he could embed all of this data with embedded carriage returns, asc 013, in a barcode, then using a barcode reader feed everything to the program without the wait states and the screen accepted the inputs lightening fast and processed the data input correctly.

So I tried the following and it worked perfectly...no wait states necessary.

Code: Select all

Send>data%CR%data1%CR%
I looked through the documentation..maybe not as closely as I should have and hadn't noticed this used for sending data. Is this something everyone else already knew and I'm just having a V8 moment?

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

Post by Marcus Tettmar » Fri May 16, 2008 11:27 am

Press Enter is the same as sending carriage return. Some people called the Enter key the "Return" key and I remember it being labeled as such on old keyboards. It took the place of the carriage return key on typewriters. So, yes, to me at least it is clear that Send>CR should be the same as Press Enter.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

evangelmike
Pro Scripter
Posts: 56
Joined: Sun May 11, 2008 9:39 pm

Post by evangelmike » Sat Jun 07, 2008 7:28 am

But please remember that if data is a variable, it must be enclosed by %'s:

[code]
Let>data=abc
Let>data1=defg
Send>%data%%CR%%data1%%CR%
[/code]

Of course if data is itself a constant or a string (such as abc or defg), this becomes:

[code]
Send>abc%CR%defg%CR%
[/code]
May you have a blessed day!

Michael D Fitzpatrick
Reg. US Patent Agent

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