Jump to content

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


h711
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...