Jump to content

Send ControlClick to Hidden Window?


Recommended Posts

Can I send a ControlClick function to a window that is hidden via WinSetState("app.exe","", @SW_HIDE)? This is NOT a windows/gui that was made with AutoIt!

I searched in AutoIt Help but all it says is

The control might first need to be given focus with the ControlFocus command.

Simulating a click on a control is only 100% accurate when the control's parent window is active - this is done automatically. Nothing will occurs if the control is disabled.

It doesnt say anything about Hidden Windows!

GoogleDude

Edited by GoogleDude
Link to comment
Share on other sites

One way to test the idea.

Run('calc')
Sleep(1000)
WinWait('Calculator')
Sleep(1000) ; Hide window with next line
WinSetState('Calculator', '', @SW_HIDE)
ControlClick('Calculator', '', '6')
ControlClick('Calculator', '', '+')
ControlClick('Calculator', '', '6')
ControlClick('Calculator', '', '=')
Sleep(1000) ; Show window with next line
WinSetState('Calculator', '', @SW_SHOW)

:)

Link to comment
Share on other sites

Silent install MSI

Run('msiexec /i "' & @TempDir & '\testapp.msi" /qn')

Use msiexec /? for help with switches at a command prompt or run box.

Edit:

If you still which to automate it, then use WinMove() to move off screen or use WinSetTrans() to hide it.

Edited by MHz
Link to comment
Share on other sites

Can an MSI be run via the RUN or RunWait function with the @SW_HIDE flag? my MSI has questions that it asks that I can trying to script. And I am trying to make it as close to 100% hidden as I can. Even by moving it off screen it still shows in the task bar.

Thanks,

GoogleDude

Edited by GoogleDude
Link to comment
Share on other sites

Can an MSI be run via the RUN or RunWait function with the @SW_HIDE flag? my MSI has questions that it asks that I can trying to script. And I am trying to make it as close to 100% hidden as I can. Even by moving it off screen it still shows in the task bar.

...

No, it shows.

You could try WinSetState() and @SW_HIDE on each window but you would get an annoying flicker of just seeing every window.

You could perhaps make a MST file with your setting and silent install it with switches. The options are set out for you. MSI's like to follow what is in their database and the usual method most people may use is to edit the MSI, or create a MST file, or even repack so silent installation is available.

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...