Multiple send same value / read data from file?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
karz
Newbie
Posts: 1
Joined: Tue Nov 16, 2004 7:02 pm

Multiple send same value / read data from file?

Post by karz » Tue Nov 16, 2004 7:17 pm

I am evaluating Macro Scheduler, I tried searching forums but didn't find anything related.

The case:

We have a customer index on database, every customer has unique customer number.

Every now and then we need to print out some customers. We do this from Windows application, it asks for start - end number, for example customers 150-200.

We have a list of customernumbers, which we need to print out, basically an Excel/TXT file:

Code: Select all

234
438
1025
77352
We don't want to print out 234-77352 because that would print thousands of (useless) pages.

To print out customers, we input 234 as start AND end number, then 438, etc...

This is little bit tricky because the same value needs to be entered twice.

Does anyone have an idea how to do this? If Macro Scheduler supports reading data from textfile, then it would look something like this:

Read CUSTOMERS.TXT Line1
Move cursor to START, Send Line1
Move cursor to END, Send Line1
Move and leftclick "Print"
Read CUSTOMERS.TXT Line2
...etc.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Tue Nov 16, 2004 9:35 pm

Use ReadLn in a loop to read each line from the file. See the help file for explanation and an example.

Use SetFocus to focus the window to send keystrokes/mouse events to. Recommend using keystrokes not mouse events. Tab moves from one field to another. Shift-Tab moves back a field. Use keystrokes to move cursor within field if necessary (ctrl-a highlights all text in field, shift-end moves to end and highlights, shift-home, home and highlight, etc etc). To press the Print button either tab to it and Press Enter or use PushButton, or MouseMove and LClick.
MJT Net Support
[email protected]

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