- ago
I use AutoIt for control.
In order to perform a number of functions with AutoIt, I have a WinForms application that includes AutoIt, and this grabs the Windows handle of WealthLab.

A usage example is to ensure WealthLab is set to the foreground. The Winforms code is below:

CODE:
private const string WlpMainName = "Wealth-Lab 7 Build 40"; public bool Focus() { var handle = NativeMethods.FindHandle(WlpMainName); if (handle == IntPtr.Zero) return false; return NativeMethods.SetForeGroundWindow(handle); }


The windows handle name includes the WealthLab build number, which of course increments.
I was hoping that it might be possible for this handle name to not include the build number so that my control application that runs AutoIt does not need to be in step with Wealthlab releases.
0
925
Solved
4 Replies

Reply

Bookmark

Sort
- ago
#2
Why not use the AutoItSetOption function using the WinTitleMatchMode option?

https://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm
1
Best Answer
- ago
#3
QUOTE:
I was hoping that it might be possible for this handle name to not include the build number

In my opinion, the benefit of recognizing the build number by everyone (including the less tech savvy users) checking if their program version is actual outweighs not having it there. 🤷
0
- ago
#4
AutoItSetOption works great. Thanks for the pointer
0

Reply

Bookmark

Sort