How to use AutoIt to click a window dialog in a different language - windows

On Windows 7, when we install an unsigned driver, it will pop-up a Windows security dialog. It is easy to have it be clicked on by AutoIt. Just search the window dialog with the specified window title.
But now, I want to use it on another platform with a different language. The window title will be changed to the local language, not the 'Windows security'.
How can I create the AutoIt script, which can handle the Windows security dialog in different language?
Fix this issue by finding a child handle from the security window class.

Try to use a class on Tittle. Title = [CLASS:notepad]
for more information visit here http://autoitsourcecode.blogspot.com/2013/04/autoit-control-send.html

Use the "AutoIt v3 Window Information" Tool provided by the "AutoIt full installation" and try to get some unique information like a Class name which is occuring in each different language dialog window as descirbed in advanced window descriptions. Then use these to search for the proper security window.
I'd suggest, you use the WinWaitActive("[REGEXPTITLE:Windows Security|Windows Sicherheit]") function with regular expressions for being able to wait for multiple windows with different titles.

Related

How can I register my app for “Open with” (File Type associations) in context menu on Windows 11?

We are trying to update our application to be available by default when clicking "Open With" in Context Menu on Windows 11 for some file types after it was installed.
The doumentation is really poor at the moment. The only place where I found this is mentioned is:
https://blogs.windows.com/windowsdeveloper/2021/07/19/extending-the-context-menu-and-share-dialog-in-windows-11/
In this blog, in Context Menu Best Practices chapter they wrote this phrase without giving an actual example:
---“Universal openers,” like technical text editors, should register to handle * so they will always be offered as an “Open with” option. They should also explicitly register for any filetypes they are optimized to handle.---
Does anyone implemented this or found some better documentation?

Is there a way to parent a standard Windows dialog inside another form?

I know it's possible to take a dialog that you built yourself and parent it on another form. But is it possible to parent a standard Windows system dialog on a form that you designed?
Specifically, I'm trying to set up a form with multiple tabs that provide different ways to obtain a reference to data used by the program. One of those tabs should represent the file system, and the ideal way to do this would be with the standard Open dialog that can be instantiated with the COM identifier CLSID_FileOpenDialog.
Is there any way to take a system dialog and cause it to appear parented on another window, without the border, title bar, etc?
There are ways to use a hook, either via SetWindowsHookEx() or SetWinEventHook(), to grab a system dialog's HWND, then you can do whatever you want with it, such as call SetParent(). But just because you CAN does not mean you SHOULD. System dialogs are designed to run as their own windows, not embedded in someone else's window. A better solution might be to use the same Shell display components that are used by Windows Explorer (and system dialogs) via IShellFolder::CreateViewObject() or SHCreateShellFolderView(), or find a third-party solution that does the hard work of interacting with the Shell for you.

read/capture Windows pop-up message in vb6?

Problem: Need to read/capture the text of Windows pop-up messages that is generated by non-VB applications.
Situation:
I've a VB6 app, part of which requires processing an excel workbook. A non vb-6 pop-up window (as attached screen) "FILE CONVERSION IN PROGRESS" comes up, while opening an new version of excel-sheet from an old MS Excel app. And automatically it closes alos.
Requirement: I want to capture that pop-up occurance in the code. And then write a conditional statement code for the 'cancel' button click event of that non vb-6 pop-up.
Can anyone suggest something?
You can access other applications with the following APIs:
FindWindow() to locate the main window of what you're looking for
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633499%28v=vs.85%29.aspx
GetWindow() to navigate through the HWNDs of the application so you can get to the button
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633515%28v=vs.85%29.aspx
GetWindowText() to access the text from a control (it cannot be an Edit control)
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633520%28v=vs.85%29.aspx
You'll want to use Spy++ (which can be downloaded) to see what the class name you're looking for when it comes up and to figure out the hierarchy to navigate properly.
You'll need to use the API Text Viewer to get the API declarations so you can use them in VB6 properly.

Where can I find a list of all window class names?

I want to use the function "findwindowex" (windows API)
I wanted to know what appropriate values ​​for the parameter "ClassName".
Are the tables that are here show the possible values​​?
If not - where can I find details of all types "ClassName"?
(Am I understood? I do not know good English.)
No, those are the names of some classes registered by the system. A great many Windows applications will be built with classes registered by those applications.
If you wish to find the name of the window class used by a particular window, use GetClassName().
You need to use a tool like SPY.EXE that's included somewhere as part of the win32 SDK. It shows the classname of the window currently under your cursor.
Microsoft Spy++ I believe when you hover over the window after clicking the Find button it shows all the information about the window.

Controlling multiple Internet Explorer windows?

We've got several web-based applications that are launched from our ERP system (SAP R/3 in this case, but since we're using ShellExec, I don't consider this a SAP issue). The problem is that we can either set the IE to "open every URL passed from the ERP system in a new window" or to "reuse any one of the existing IE windows" (same problem with tabs). Both settings are not acceptable for our users: one of the web applications is a rather bulky medical image viewer applet that wreaks havoc if invoked multiple times. The other option is a no-go either because this way opening the image browser for a patient automatically displaces the lab result display for the very same patient and vice versa.
I'd like to have some control over which window may or may not be reused. My idea would be a kind of "window tag" and a helper program that checks if a window with that tag exists - if it does, reuse it, if not create it. So basically
IELauncher SEARCH http://www.google.com
would open a new window and tag it as SEARCH.
IELauncher DEVEL http://stackoverflow.com
would open a second window, tagging it as DEVEL. Then
IELauncher SEARCH http://www.wikipedia.org
would replace the contents of the first (google) window only.
Is this possible at all? Do you have any pointers for me where to start? I don't even know what to look for...
I had to resort to some rather ugly methods - dynamically assembling a HTML page that uses JavaScript and window.open() to open and access a window by name, then close the page executing the JavaScript. Ugly, but at least this way you get the additional benefit of being able to control certain aspects of the browser window like switching of the menu bar, toolbar and location bar.

Resources