Jump to content

Slow Send to DOS Window


Recommended Posts

Hello

I know this is an old topic. But I can't seem to figure out how to over come the problem.

I am trying to control a really old DOS application. I want to cut and past from a DOS window on Win-XP.

Func SnapShot()

Send("!{Space}ek")

Send("+{down 20}+{right 82}{ENTER}")

$r = ClipGet()

;MsgBox(0,"Clip",$r,3)

Return $r

EndFunc

It appears that the first 10 down-arrows are sent real slow, then the first forty right arrows are sent slowly, the last forty are sent at about as fast as I can type. The whole sequence takes about 12 seconds. This fact conflicts with the fact that I am using this application as a signal generator to troubleshoot some old (20 year old) PC boards. The snap shot helps me decide what command to send to the application to generate the proper signal.

Has any one discovered a way to make something similar go faster?

Someone once suggested sending keys from the paste buffer, but I don't think that will work for this application.

tbodine

Link to comment
Share on other sites

  • Developers

This takes 1600 ms on my WinXP:

$st = TimerInit()
Run(@ComSpec & " /k dir")
Sleep(500)
Opt("SendKeyDelay", 1)
WinActivate(@ComSpec)
SnapShot()
ConsoleWrite("Time:" & TimerDiff($st))
WinClose(@ComSpec)
;
Func SnapShot()
    Send("!{Space}ek")
    Send("+{down 20}+{right 82}{ENTER}")
    $r = ClipGet()
;MsgBox(0,"Clip",$r,3)
    Return $r
EndFunc ;==>SnapShot
Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Thank you for pointing that out.

When I run your script it does run incredibly fast.

So I guess the application I am trying to control must do constant screen updates, which are invisible since the screen doesn't

change.

Thanks again.

Regards Tom Bodine

tbodine

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...