Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2008
    Posts
    52

    need help } if a window is detected then change something

    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

  2. #2
    Join Date
    Jan 2008
    Posts
    52
    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

  3. #3
    Join Date
    Jun 2006
    Posts
    62
    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
    Attached Files

  4. #4
    Join Date
    Apr 2007
    Location
    Suffolk, UK
    Posts
    176
    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
    returns nil if the process isnt running, it returns the window handle otherwise.

Similar Threads

  1. Need Some Help With WebBrowserWindow DLL Getting Window Closed
    By coderanger in forum AutoPlay Media Studio 6.0
    Replies: 0
    Last Post: 08-10-2007, 12:29 AM
  2. set Window transparency!
    By goldingname in forum AutoPlay Media Studio 6.0
    Replies: 3
    Last Post: 01-12-2007, 10:03 PM
  3. Change Project window style
    By Raindog26 in forum AutoPlay Media Studio 6.0
    Replies: 2
    Last Post: 09-21-2006, 02:50 AM
  4. Creating a Non-Rectangular Window
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 10-03-2003, 12:40 PM
  5. HOWTO: Get the Position and Size of a Window
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 09-27-2002, 09:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts