Jump to content
Sign in to follow this  
wisem2540

Cannot click button in window. This should be so simple

Recommended Posts

wisem2540

I have made alot of auto installers, but this one is driving me crazy.

Here is the window info

>>>> Window <<<<
Title: PICOM Client Installation
Class: #32770
Position: 562, 434
Size: 475, 331
Style: 0x94C800C4
ExStyle: 0x00010101
Handle: 0x0006010E

>>>> Control <<<<
Class: Button
Instance: 1
ClassnameNN: Button1
Name: 
Advanced (Class): [CLASS:Button; INSTANCE:1]
ID: 1
Text: OK
Position: 245, 264
Size: 88, 28
ControlClick Coords: 60, 18
Style: 0x50010000
ExStyle: 0x00000004
Handle: 0x00D4016E

>>>> Mouse <<<<
Position: 870, 738
Cursor ID: 0
Color: 0xF0F0F0

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
OK
Cancel
PICOM Enterprise PACS by ScImage, Inc.

The PICOM Client Software Suite provides secure access to PICOMEnterprise Server to stream Image, Reports, Waveforms, etc.

You must Install PICOM Client Software to access Electronic Patient Folders from the PICOM Server

Due to high volume of data, the PICOM Client should be installed on a harddrive with the most free space available on your system.

>>>> Hidden Text <<<<

END PASTE

 

pretty standard window.  But I cannot click this button to save my life.  I have tried Controlclick ID 1, I have Tried Controlclick ClassnameNN Buton1, they just do not work.  What is even more weird is that the controlclick returns a code of 1, as if it were successful!  My latest attempt is winkill and winclose, those do not work either.  Youll see by the following script that I have a msbox near the end, that is a sanity check so i know the window is seen, and that works fine.

Run ("msiexec.exe /i Picomclient.msi"); Runs installer
WinWaitActive ("Picom", "To continue"); Waits for installer window
ControlClick ("Picom", "To continue", 3737); clicks next button
WinWaitActive ("Picom", "Customer Information"); waits for customer info screen
ControlSetText ("Picom", "Customer Information", 5341, "User"); set username field
ControlSetText ("Picom", "Customer Information", 5385, "MIR"); set org field
ControlClick ("Picom", "Customer Information",3737); clicks next button
WinWaitActive ("Picom", "Ready to Install"); waits for ready to install screen
ControlClick ("Picom", "Ready to Install",3742); clicks Install button
WinWaitActive("PICOM","Due to high volume of data");waits for drive selection window
MsgBox (0, "test", "Found Window")
WinClose ("PICOM", "Due to high volume")

Share this post


Link to post
Share on other sites
smellyfingers

ControlClick("PICOM", "OK", "[Classnn:Button1]")

Did you try it like this ?, assuming PICOM is the MAIN program window

Share this post


Link to post
Share on other sites
wisem2540

Yes.  Just to make sure I wasnt nuts, I did something like this

Winactivate ("PICOM", "OK")

Controlclick ("PICOM, "OK", "[ClassNN:Button1]")

When I do that, the window activates as it should, but the click doesnt seem to happen.  Even though controlclick seems to return a 1 as if successful.

thanks for your reply.  In the meantime, I am going to try this on a different OS other than win7 x64

Share this post


Link to post
Share on other sites
wisem2540

This seems to work fine under XP....  interesting.

EDIT works fine under Win7 32bit as well.  Seems to only NOT work on win7 x64

any advice on that?

Edited by wisem2540

Share this post


Link to post
Share on other sites
smellyfingers

Hmm maybe you have an older autoit version not compatible with 64, cause i run win7 x64 and it's working for me on latest autoit version

Share this post


Link to post
Share on other sites
wisem2540

It appears to have been caused by UAC.  Ill need to play around some more and see about turning it off.

Share this post


Link to post
Share on other sites
dragan

Try without text parameter:

ControlClick('PICOM', '', '[CLASSNN:Button1]')

Share this post


Link to post
Share on other sites
wisem2540

Thanks for the info guys.  UAC was the answer.  I think probably what was happening was the window was technically a new window and UAC did not like me interacting with it.  All is well.

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  

×