Jump to content

Recommended Posts

Posted

Hi!

I am quite new or AutoIt.

I've written a script for automating a download procedure from a DOS payroll program.

After it is started from cmd.exe the program can be commanded by keystrokes.

I would like to monitor the response time (opening a modules) of this program for keystrokes.

The problem with WinWaitActivate that the running DOS program has only one window with the same title, so it is not good for solving this problem.

I use Sleep() for waiting a certain time, but it is not the best because the reponse time is not the same. This DOS programs ha a central database in the server, and when 4-5 person are working simultaneously, a module opening lasts 3 sec.

Do you have any idea how to minimize the running time (without using Sleep())?

For example If I should able to see the containing of buffer, I can upgrade my script.

Here is a part of my script (it is quite simple)

Run ( 'cmd' )

WinWaitActive("C:\WINDOWS\system32\cmd.exe")

;run the DOS program

Send ( 'cd{ASC 92}{ENTER}k:{ENTER}cd{SPACE}Backup-BER2007{ASC 92}DAT1{ENTER}BER2007{ENTER}')

WinWaitActive("C:\WINDOWS\system32\cmd.exe - BER2007")

;sending the login name

Send ( 'BE{ENTER}' )

Sleep ( 1000 )

;sending the password

Send ( 'nexon{ENTER}' )

Sleep ( 1000 )

;choosing a module from the list

Send ( '{DOWN}{DOWN}{DOWN}{ENTER}' )

;waiting for loading

Sleep ( 1000 )

.... etc

Thanx

Posted

Welcome to the forum.

You might look into the STDIO parameter for the AutoIt Run function to handle the first part of the code that you posted.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

Welcome to the forum.

You might look into the STDIO parameter for the AutoIt Run function to handle the first part of the code that you posted.

Thanks, it looks better!

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
  • Recently Browsing   0 members

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