GoogleDude Posted April 29, 2007 Share Posted April 29, 2007 (edited) 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 isThe 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 April 29, 2007 by GoogleDude Link to comment Share on other sites More sharing options...
MHz Posted April 29, 2007 Share Posted April 29, 2007 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) KeiosStarqua 1 Link to comment Share on other sites More sharing options...
sandman Posted April 29, 2007 Share Posted April 29, 2007 Yep, worked fine [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
GoogleDude Posted April 29, 2007 Author Share Posted April 29, 2007 Thanks that did the trick. How can I lunch a MSI hidden? I tried the below but it still wont open hidden. run ('msiexec /i "' & @TempDir & '\testapp.msi"',"",@SW_HIDE) GoogleDude Link to comment Share on other sites More sharing options...
MHz Posted April 29, 2007 Share Posted April 29, 2007 (edited) 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 April 29, 2007 by MHz Link to comment Share on other sites More sharing options...
GoogleDude Posted April 29, 2007 Author Share Posted April 29, 2007 (edited) 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 April 29, 2007 by GoogleDude Link to comment Share on other sites More sharing options...
MHz Posted April 29, 2007 Share Posted April 29, 2007 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now