tbodine88 Posted January 16, 2008 Share Posted January 16, 2008 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 More sharing options...
Developers Jos Posted January 16, 2008 Developers Share Posted January 16, 2008 (edited) 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 January 16, 2008 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 More sharing options...
tbodine88 Posted January 17, 2008 Author Share Posted January 17, 2008 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 More sharing options...
Developers Jos Posted January 17, 2008 Developers Share Posted January 17, 2008 (edited) can't you use ?: Send("!{Space}es{Enter}") Edited January 17, 2008 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now