I am trying to use MS to automate the installation of Adobe Flash player 9.0.
I get to a point in the installation where a window box pops up with no title - this is relevant. There is an informational "i" symbol inside of the dialog box with the words Uninstallation Complete and a button that says OK. If I manually push the OK button the installation proceeds.
My problem is how to automate that push OK button. PushButton, WaitforWindow all seem to require a window title. In my case the window title is blank - all I see is a blue border - no wording at all.
Can anyone suggest how to proceed.
Here is the code so far:
Let>RP_WAIT=1
Let>PathtoFlash8a=C:\WINDOWS\system32\Macromed\Flash\Flash8a.ocx
Run Program>%sys_dir%\regsvr32.exe /s /u %PathtoFlash8a%
Run Program>"\\bcscnet.ca\dfs\dist\apps\CLIENT\Adobe\Adobe Flash\Version 9.0\uninstall_flash_player.exe" /silent
Press Enter this is where I am having a problem with that OK button, I need to have the OK button pushed to continue
Run Program>%sys_dir%\msiexec.exe /i "\\bcscnet.ca\dfs\dist\apps\CLIENT\Adobe\Adobe Flash\Version 9.0\install_flash_player_active_x.msi" /qb
Window with no title - how to press the OK button
Moderators: Dorian (MJT support), JRL
You might try
let>WIN_USEHANDLE=1
SetControlText>Window Handle,ClassName,Instance,NewWindowText
then...
pushbutton>NewWindowText,OK
I have used this technique before when I have to manage multiple instances of the same exact window name.
I can probably grab a code example from a customer site if you need it...it will take a day or two to get it.
let>WIN_USEHANDLE=1
SetControlText>Window Handle,ClassName,Instance,NewWindowText
then...
pushbutton>NewWindowText,OK
I have used this technique before when I have to manage multiple instances of the same exact window name.
I can probably grab a code example from a customer site if you need it...it will take a day or two to get it.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Zeke,
First of all you will never be able to press the button because you are using RP_WAIT=1. This tells the script to wait until the program launched with Run Program has TERMINATED before continuing. So after the Run Program line the application won't even be there any more. The script is held up intil it exits.
I would recommend you use RP_WAIT=2 (wait until *READY*) AND WaitWindowOpen to wait for the App's window to appear before continuing:
Let>RP_WAIT=2
Run Program>bla.exe
WaitWindowOpen>dddd
You may find you can now just send the enter key to the window. Send tab to move from field to field, and Enter to press a button.
For the case of a window with no title, what I would do is 1. Wait for the foreground window to change (become something else) and then 2. get the foreground window's handle:
//do something to cause the title-less window to appear
WaitWindowChanged>10
Let>WIN_USEHANDLE=1
GetActiveWindow>hWnd,x,y
Then you have the window's *handle* and you can use SkunkWorks' suggestion and change the window's title, if needs be.
First of all you will never be able to press the button because you are using RP_WAIT=1. This tells the script to wait until the program launched with Run Program has TERMINATED before continuing. So after the Run Program line the application won't even be there any more. The script is held up intil it exits.
I would recommend you use RP_WAIT=2 (wait until *READY*) AND WaitWindowOpen to wait for the App's window to appear before continuing:
Let>RP_WAIT=2
Run Program>bla.exe
WaitWindowOpen>dddd
You may find you can now just send the enter key to the window. Send tab to move from field to field, and Enter to press a button.
For the case of a window with no title, what I would do is 1. Wait for the foreground window to change (become something else) and then 2. get the foreground window's handle:
//do something to cause the title-less window to appear
WaitWindowChanged>10
Let>WIN_USEHANDLE=1
GetActiveWindow>hWnd,x,y
Then you have the window's *handle* and you can use SkunkWorks' suggestion and change the window's title, if needs be.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?