The site mentioned by dm4ever includes JSSys3.dll, which can be used to do a multitude of things, including:
GetOpenWindowTitles
GetActiveWindowTitle
SetWindowActive
For example:
Code:
Dim sys
Set sys = CreateObject("JSSys3.Ops")
v = Sys.GetOpenWindowTitles(a)
If v > 0 Then
For i = 0 To UBound(a)
If InStr(1, a(i), "textpad", vbTextCompare) <> 0 Then
s = a(i)
Exit For
End If
Next
If s <> "" Then
Set WshShell = CreateObject("WScript.Shell")
WshShell.AppActivate s
WScript.Sleep 1000
WshShell.SendKeys ("% x")
End If
End if
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.