Sign in to follow this  
Followers 0
Djordhan

Automate application on localized Windows

7 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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.

 

Share this post


Link to post
Share on other sites

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 :)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

I'll try to fix it using the window class and if I don't succeed I'll keep you posted :) Thanks!

Share this post


Link to post
Share on other sites

Are you 100% sure that the class name are the same on translated Windows ? Like "MsiDialogCloseClass" won't become something like "MsiDialoguesClososClassum" ?

Share this post


Link to post
Share on other sites

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 connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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.

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by Djordhan

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  
Followers 0