プロセスハンドルを見つけようとしましたが、
HWND handle = FindWindow(0 ,TEXT("window title"));
ウィンドウのタイトルが必要です
同じタイトルの tow プロセスがあるとしましょう
。
for each p as process in process.getProcessByName("notepad")
if process.processname = "notepad" then
handle = p.handle
exit for
end if
next