Sign in to follow this  
Followers 0
newbie2012

Run Autoit command once a job is completed in SecureCRT

2 posts in this topic

Hi there,

could anyone please suggest me something on a problem I've got? I'm using Autoit to work with SecureCRT. And I need a particular part of my script to be executed once a scheduled job in SecureCRT is finished. Is there any I can detect it? Maybe it can be done by looking up for an occurrence of some string in the terminal? My code is below.

Run("securecrt.exe");

WinWaitActive("Connect");

send("{enter}");

WinWait('Secure CRT');

send("{UP}");

send("{enter}");

Send("password");

send("{enter}");

send("./jobrun RunJob");

send("{enter}");

//here I'd like to wait until the job is finished and then switch to another directory and run another scheduled job

send("another directory");//this part never works

send("{enter}");

send("./jobrun RunJob");

send("{enter}");

Share this post


Link to post
Share on other sites



you can make :

Do

Sleep(1000)

Until ProcessExists( [runjob] )

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  
Followers 0