Sign in to follow this  
Followers 0
techledr

App Loosing Focus causing WinWait to not process

4 posts in this topic

I am writing an Installer "wrapper" to automate a installer package which does not have an "unattended install option". This installer package will be deployed using a 3rd party deploy tool Opsware, which will copy the installer to the remote server, and run the Autoit compiled exe to install the software package desired. This proggy is working as long as I run it locally or RDP on the server, but problems results when running it via the remote deployment tool. In my efforts to RDP to the remote server, I see it always stuck at the first screen of the software packages installer, waiting on my script to hit enter. I also have observed that the software packages windows's not the current program in "focus" in the windows gui. While RDP'd I have even clicked on the Windows in question, and the Autoit program continues.

Does anyone know how to control which program is in Windows Gui "front / focus"? I have attempted to send !{TAB} but that hasn't helped either.

Here's the small amount of code that is being affected today:

Run($InstallerPath) ;Runs the Installer
sleep(5000);Wait 5 seconds, allow first install screens to finish..they are non-intervention.
WinWait("Welcome", "Welcome to Software upgrade. This program will upgrade your Software installation to build")  
Send("{ENTER}")

.

Share this post


Link to post
Share on other sites



Run($InstallerPath) ;Runs the Installer
sleep(5000);Wait 5 seconds, allow first install screens to finish..they are non-intervention.
WinWait("Welcome", "Welcome to Software upgrade. This program will upgrade your Software installation to build")  
WinActivate ("Welcome", "Welcome to Software upgrade. This program will upgrade your Software installation to build");this sets that window as the current active window
Send("{ENTER}")

- The Kandie Man ;-)


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites
Run($InstallerPath) ;Runs the Installer
sleep(5000);Wait 5 seconds, allow first install screens to finish..they are non-intervention.
WinWait("Welcome", "Welcome to Software upgrade. This program will upgrade your Software installation to build")  
WinActivate ("Welcome", "Welcome to Software upgrade. This program will upgrade your Software installation to build");this sets that window as the current active window
Send("{ENTER}")oÝ÷ Ù8^)©Ýãú®¢×¹ë-Èjf§{òJ.Ùí¶Z)Àrدj׿mÊ&y·¢·°Ø[Z)Öj+m«­¢+ÙIÕ¸ ÀÌØí%¹Íѱ±ÉAÑ ¤íIÕ¹ÌÑ¡%¹Íѱ±È)ͱÀ ÔÀÀÀ¤í]¥ÐÔͽ¹Ì°±±½Ü¥ÉÍÐ¥¹Íѱ°ÍɹÌѼ¥¹¥Í ¸¹Ñ¡äɹ½¸µ¥¹ÑÉٹѥ½¸¸)]¥¹Ñ¥ÙÑ ÅÕ½Ðí]±½µÅÕ½Ðì°ÅÕ½Ðí]±½µÑ¼M½ÑÝÉÕÁɸQ¡¥ÌÁɽɴݥ±°ÕÁÉå½ÕÈM½ÑÝÉ¥¹Íѱ±Ñ¥½¸Ñ¼Õ¥±ÅÕ½Ðì¤íÑ¡¥ÌÍÑÌÑ¡ÐÝ¥¹½ÜÌÑ¡ÕÉɹÐÑ¥ÙÝ¥¹½Ü)]¥¹]¥Ð ÅÕ½Ðí]±½µÅÕ½Ðì°ÅÕ½Ðí]±½µÑ¼M½ÑÝÉÕÁɸQ¡¥ÌÁɽɴݥ±°ÕÁÉå½ÕÈM½ÑÝÉ¥¹Íѱ±Ñ¥½¸Ñ¼Õ¥±ÅÕ½Ðì¤)M¹ ÅÕ½Ðíí9QIôÅÕ½Ðì¤

Share this post


Link to post
Share on other sites

Shouldnt the WinActivate come before with WinWait ??

No. WinWait() waits for the window to exist, not necessarily being active. WinActivate() makes the window active, which only makes sense after you are sure it exists.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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