Jump to content

Recognizing CMD window operation as over in Autoit


Recommended Posts

Hi folks

I have two simple scripts.

One opens the cmd window and runs the imp command for Oracle dump import.

the second script recompiles all the invalid objects in the database.

the problem is that dump import can take a long while. is there any way to know when the dump import is over?

can we recognize when the command prompt is returned?

or maybe we can change the cmd window header when the dump import is done. any ideas?

regards

RIshav

Link to comment
Share on other sites

Post your source, or PM me if you don't want to release to public.

no source as such.

its just a

run(cmd)

send(imp user/pass@orcl file=c:\file.dmp log=log.txt full=y ignore=y)

send(enter)

When the import is over, command prompt is returned.

<--------->

Now i run the recompile script;

run(utlprp.sql for orcl db)

the problem is the <-----> part. i want to combine the two scripts into one. but don't know how to recognize that the dump import is done.

ps. i just thought of a workaround. not sure if its a good idea. i can maybe make a batch file with the imp command in it. so when the import is over, the cmd windows also closes. but i suck at making batch files so i probably will be as lost as i am now.

Hi,

maybe a solution:

Run ("Script for Import", [workingdir, etc....])
While ProcessExists ("Processname of Oracle import.exe") <> ""
     sleep (50)
Wend
MsgBox (0,"Finished Import","Starting Recompilation.....", 10)
Run ("Script for Recompilation",..)

;-))

Stefan

Tha sounds like just the thing the doctor ordered. ^_^

I didn't realize that the CMD window ran a whole new process.

i'll give it a go tomorrow. Thanks for the help stephan.

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...