Sending Text

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
macrunning
Pro Scripter
Posts: 68
Joined: Wed May 04, 2005 10:24 pm

Sending Text

Post by macrunning » Sat Feb 11, 2006 12:42 am

When I send text to a field for say finding a file on my hard drive, is there a way to slow down how fast the text goes in. I think that it is being sent to fast and windows is unable to pic up on the full directory path.
For example:
I need this (C:/my document/my path/to some file.txt

But I'm getting this (ument/my path/to some file.txt)

This is cause the macro scheduler to send up a pop up display that says something about aborting the script.

Any help would be greatly appreciated

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Sat Feb 11, 2006 6:13 am

macrunning,
You can slow down the speed of the individual characters with the SK_DELAY variable.

Let>SK_DELAY=10

Will cause a 10 millisecond delay between each character being sent.

However, the way that you've described the situation, it sounds more like you're not waiting long enough before you start sending the text. If you posted the offending portion of the script we could look to see what might be the problem. Otherwise I'd suggest placing a short wait in front of the send statement just to see if the delay gets the text to properly go into the field.

Hope this is helpful,
Dick

macrunning
Pro Scripter
Posts: 68
Joined: Wed May 04, 2005 10:24 pm

Post by macrunning » Sat Feb 11, 2006 4:23 pm

Thanks for the help.
Also I already added a wait>2 before sending the text and have adjusted it up to wait>4 but the script seems to (at random time) truncate the beginning of the string I am sending to the field. The screen I need to send type to definately is up and sitting for a couple of seconds so I think I've eliminated that bug and this has lead me to believe that maybe the characters are being sent to fast and windows is having trouble interpreting this. I'm no pro though.
Thanks again.

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

Post by Marcus Tettmar » Sat Feb 11, 2006 4:47 pm

Hi,

Dick suggested you slow down the key send rate with:

Let>SK_DELAY=10

This is not the same as Wait>2. SK_DELAY creates a delay BETWEEN characters sent in the Send command.

Did you try that?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Mon Feb 13, 2006 12:44 am

mac,

Could you tell us more about the window to which you are sending the data? Could you paste the code in this forum so we can see more than the 'send' statement.

as a matter of practice, I always use something like this.

waitwindowopen>MyWindow
waitready>0
wait>.25 (adjust this time to suit your app)

Then, when possible, I like to use SetControlText instead of the Send command. You will need to "View System Windows" to get the info needed for using SetControlText....it is very powerful, though.

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