alright the title isnt clear but
what i want is when a specific EXE is open then a label is changed
such as
label game.EXE : not opened
and once it detects as the EXE as open
then
game.EXE : open
Professional Software Development Tools
alright the title isnt clear but
what i want is when a specific EXE is open then a label is changed
such as
label game.EXE : not opened
and once it detects as the EXE as open
then
game.EXE : open
im thinking may useing Window.EnumerateProcesses and the procsess game.EXE then label.settext to whatever
but im not sure can some 1 help me out![]()
Hi
This is for 50% of your work!
I can not other 50% ! because i'm newbie
run this project and then
you run the "game.exe" and see result in lable
returns nil if the process isnt running, it returns the window handle otherwise.Code:function FindRunningEXE(exeName) local eProc = Window.EnumerateProcesses(true); for handle, ProcPath in eProc do local spPath = String.SplitPath(ProcPath); local lspPath = String.Lower(spPath.Filename..spPath.Extension); local lexeName = String.Lower(exeName); if lspPath == lexeName then return handle end end end handle = FindRunningEXE("game.exe") if handle ~= nil then Label.SetText("Label1", handle); else Label.SetText("Label1", "Not open"); end