Procedure.s GetForegroundWindowTitle(Programm$) RunProgram(Programm$,"","",0) Delay(100) hwnd=FindWindow_("notepad",#Null) Length = GetWindowTextLength_(hwnd)+1 *Buffer = AllocateMemory(Length) GetWindowText_(hwnd,*Buffer,Length) ProcedureReturn PeekS(*Buffer) FreeMemory(*Buffer) EndProcedure MessageRequester("","Titel: "+GetForegroundWindowTitle("notepad.exe"),0)