Djordhan Posted January 18, 2012 Share Posted January 18, 2012 Hi there! I created a small script that handles an installation but after sending it to customer for testing purpose.. I realized my mistake. Currently I'm looking at the state of the installer with functions like WinWaitActive and things like that... which requires me to check for the title since I can't (or don't know how) to get the windows handle on a window that only exists after the script is started. So you imagine that my title: "Software Installation" is something like "Software Instalacion". So I'm screwed and the script just hang. Is there a way to automate a software no matter what language it is set to ? Thanks a lot! JD Link to comment Share on other sites More sharing options...
bogQ Posted January 18, 2012 Share Posted January 18, 2012 (edited) look in help file for Window Titles and Text (Advanced)hint:WinWaitActive("[CLASS:Notepad]", "")to get win class use Info tool that come with autoit instalation Edited January 18, 2012 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 18, 2012 Moderators Share Posted January 18, 2012 Hi, Djordhan. It depends on the installation type. Can you tell us what the name of the software is? Also, is it a Setup.exe or an MSI, or some other install method? Maybe post your working script so we can take a look "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Djordhan Posted January 18, 2012 Author Share Posted January 18, 2012 I'll try to fix it using the window class and if I don't succeed I'll keep you posted Thanks! Link to comment Share on other sites More sharing options...
Djordhan Posted January 18, 2012 Author Share Posted January 18, 2012 Are you 100% sure that the class name are the same on translated Windows ? Like "MsiDialogCloseClass" won't become something like "MsiDialoguesClososClassum" ? Link to comment Share on other sites More sharing options...
bogQ Posted January 18, 2012 Share Posted January 18, 2012 if its identical version it shud not geave any problems i hardly think that someone will rename win class for diffrent languages, and i hardly think that someone will rename it on diffrent versions. well at least it never happend to me. TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Djordhan Posted January 18, 2012 Author Share Posted January 18, 2012 (edited) I successfully used the classname instead of the title and another problem was that both main window and all its child popups had the same classname so I had to use to retrieve the extended style to control the proper window.What I needed is to make sure that when a popup is shown, the main window is already closed before proceeding. Previously I used nested If WinExists("title") statements to check if main and popup windows existed simultaneously. Now it does exactly what I need without the dependency on the title.Looks somewhat like this:$aWinList = WinList("[CLASS:MsiDialogCloseClass]") If UBound($aWinList) = 2 Then ;Make sure only one window of that class exists $aExStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $aWinList[1][1], "int", -20) If Hex($aExStyle[0]) = 00000100 Then ;Checks if the window is of type "popup" Edited January 18, 2012 by Djordhan 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