;Autor: ts-soft EnableExplicit Procedure CheckRunningPureBasic(Name.s) Protected result.l, Snapshot.l, ProcessFound.l, PN$, Process.PROCESSENTRY32 Process\dwSize = SizeOf(PROCESSENTRY32) Snapshot = CreateToolhelp32Snapshot_(#TH32CS_SNAPPROCESS, 0) If Snapshot ProcessFound = Process32First_(Snapshot, Process) While ProcessFound PN$ = UCase(PeekS(@Process\szExeFile, #PB_Any, #PB_Ascii)) If UCase(Name) = GetFilePart(PN$) : result = #True : Break : EndIf ProcessFound = Process32Next_(Snapshot, Process) Wend CloseHandle_(Snapshot) EndIf ProcedureReturn result EndProcedure If CheckRunningPureBasic("PureBasic.exe") MessageRequester("","Programm läuft gerade.",0) Else MessageRequester("","Nicht gefunden.",0) EndIf