[RESOLVED] Window handle from title
Is it possible to get the window handle of a window using just its "title"
The method has be a universal method which can be used by different languages.
I was thinking something like a vbscript file which is then executed using system shell the output is sent to a text file in a temp folder. you open the text file and then get the handle then delete the file.
anything like this possible
Re: Window handle from title
Ok got it sorted
Code:
Dim DataBin
Set obj = CreateObject("APIWrapperCOM.APIWrapper")
DataBin = obj.FindWindow("'+title+'")
Dim filesys, filetxt, getname, path
Set filesys = CreateObject("Scripting.FileSystemObject")
Set filetxt = filesys.CreateTextFile("'+output+'", True)
filetxt.WriteLine(DataBin)
filetxt.Close
title is the name of the window you pass (as a variable)
output is where the hwnd (or 0 if none found) is written to as a text file
it requires a few files a to register the dll as well see here:
http://www.codeproject.com/Articles/...ow-in-VBScript