Jump to content
Sign in to follow this  
Rishav

Recognizing CMD window operation as over in Autoit

Recommended Posts

Rishav

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

Share this post


Link to post
Share on other sites
Rishav

unfortunately no. It would have be very easy then. Also, the header doesn't changes either.

Share this post


Link to post
Share on other sites
99ojo

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

Edited by 99ojo

Share this post


Link to post
Share on other sites
Rishav

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.

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  

×