Jump to content
Sign in to follow this  
tbodine88

Slow Send to DOS Window

Recommended Posts

tbodine88

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

Share this post


Link to post
Share on other sites
Jos

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
tbodine88

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

Share this post


Link to post
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
Sign in to follow this  

×