Sign in to follow this  
Followers 0
9h0s7

If then with active window

3 posts in this topic

#1 ·  Posted (edited)

Greetings fellow scripters! Here's the low down. I have script that launches a installation. The installation will do one of two things. If it detects that the program is already installed it pop ups a message and the installer quits when you click ok. Or it will proceed through the installation. My problem has been figuring out how to getting to check which on pop ups and take the correction action. Here's what I have so far.

*Note some names have been changed to protect the guilty*

Run("\\pcname\folder\program.exe")

If WinWaitActive("title", "stuff in the box") Then

Send("{ENTER}")

Exit

EndIf

--the above works--

WinWaitActive("title", "stuff")

Send("{ENTER}")

WinWaitActive("title", "stuff")

Send("!a")

Send("{ENTER}")

WinWaitActive("title", "stuff")

Send("{ENTER}")

thanks for the help!

Edited by 9h0s7

Share this post


Link to post
Share on other sites

right, like I said that part works, it's the other part that doesn't. When I run the script and the program is installed the script makes the installer exit. That part works. However, when the program is not installed the script doesn't do anything.

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