Jump to content
Sign in to follow this  
h711

Why is a pre-filled text box empty when I run the automation

Recommended Posts

h711

Hi, I try to automate an installer. On one page, there is a text box with some pre-filled text in it. But when I run my script, this box is empty. I use:

ControlClick ( "Installation Wizard", "", "[CLASS:Button; INSTANCE:2]" )
to get to that page. Nothing else was done after that.

Any ideas? Thanks!

Share this post


Link to post
Share on other sites
youknowwho4eva

Does the control auto-clear when it gets focus?


Giggity

Share this post


Link to post
Share on other sites
h711

No, it does not auto clear the box during the manual installation. Not even when click inside the box.

Share this post


Link to post
Share on other sites
h711

This text box should display the device name I selected from the last page. I think the way I select the device from a list box may have something to do with this problem.

$h = WinGetHandle("[CLASS:SysListView32]")
$hwnd = ControlGetHandle($h,"","SysListView321")
_GUICtrlListView_SetItemSelected($hwnd,3)
_GUICtrlListView_ClickItem($hWnd,3)

ControlClick ( "Installation Wizard", "", "[CLASS:Button; INSTANCE:2]" )
Edited by h711

Share this post


Link to post
Share on other sites
h711

Forget about my last post, I think I know the reason why the textbox is empty.

The installer I am automating is in E:\ drive. But the script is located in a C:\ drive. The installer use relative path to locate some file, which caused the problem. If I manually click on the installer on E:\ drive, all relative path works fine. But since the script is in C:\, at some point this logic breaks.

Is there a way to let the script run from the same path as installer? Since this installer is on a CD, I cannot put the exe to that location.

Thanks for the help.

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  

×