@Aaron S If you have any sample code for enumerating through windows, that would be fantastic. Otherwise I can sift through Microsoft's documentation.
Ok, so here's some code I used for that purpose. Just note it was written in 2017 (but I expect it would still work); since then, I'm using the MBS plugin for enumerating the windows without the declares.
This code would bring a window to the foreground, given a passed name:
Soft Declare Function FindWindowW Lib "user32.dll" (lpClassName As integer,lpWindowName As integer) as integer
Soft Declare Function GetWindow Lib "user32" (hWnd As integer,wCmd As integer) As integer
Soft Declare Function GetWindowTextW Lib "user32" (hWnd As integer,lpString As ptr,cch As integer) As integer
Soft Declare Sub ShowWindow Lib "User32" (wnd As Integer, nCmdShow As Integer)
Soft Declare Function SetForegroundWindow Lib "User32" (hWnd As Integer) As Integer
Dim ret As Integer
Dim mb as new MemoryBlock(255)
if GetWindowTextW(ret,mb,mb.size)>0 then
if mb.WString(0)="The window's title" then
Please let me know whether it works (I'm not on Windows right now).