#DefineFunction GetProcessExeFromWindowTitle(wnd) If WinVersion(4)==4 ; NT AddExtender("wproc34i.dll") h=DllHwnd(wnd) ; window title goes in here bb=BinaryAlloc(4) BinaryEodSet(bb,4) dllname=StrCat(DirWindows(1),"user32.dll") DllCall(dllname,long:"GetWindowThreadProcessId",long:h,lpbinary:bb) p=BinaryPeek4(bb,0) BinaryFree(bb) modlist=tListMod(p,0) firstmod=ItemExtract(1,modlist,@TAB) exe=ItemExtract(1,firstmod,"|") Else exe=WinExename(wnd) EndIf Return (exe) #EndFunction prog=GetProcessExeFromWindowTitle("JAWS") Message("",prog) Exit