Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2005
    Location
    In Wonderworld
    Posts
    246

    System.EnumerateProcesses not Working the way id like it to!what am i doing wrong

    Whats wrong with this code,
    i have tried different ways still it wont work.

    what i am trying to do is put a code to on Show and when the application is running then i want it to check if notepad is running, and if it is i want it to display a message in a input object, that notepad is running, but if notepad is not running i want it to input that notepad is not running.
    but i can not make it work, it seems simple but i can not figure it out!

    this code is put on Show
    Code:
    file_to_check_for = "notepad.exe"; --have all lowercase
    processes = System.EnumerateProcesses();
    
    for j, file_path in processes do
        file = String.SplitPath(file_path);
        if (String.Lower(file.Filename..file.Extension)) == file_to_check_for then
            Input.SetText("Input1", "Notepad is running");
        else Input.SetText("Input1", "Notepad is not running");
        end
    end

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Code:
    file_to_check_for = "notepad.exe"; --have all lowercase
    processes = System.EnumerateProcesses();
    
    bNotePadRunning = false;
    for j, file_path in processes do
        file = String.SplitPath(file_path);
        if (String.Lower(file.Filename..file.Extension)) == file_to_check_for then
            bNotePadRunning = true;
            break;
        end
    end
    
    if bNotePadRunning then
            Input.SetText("Input1", "Notepad is running");
    else
            nput.SetText("Input1", "Notepad is not running");
    end

  3. #3
    Join Date
    Apr 2005
    Location
    In Wonderworld
    Posts
    246
    Worm you did it!
    you sure are good at this
    As always!
    A hugh thanks to you!
    i got an error on line 16 at first , but i realised you just missed the I in input.
    thanks again!
    Last edited by Wonderboy; 04-17-2006 at 02:00 PM.

Similar Threads

  1. Working with Tables and Files
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 12-23-2003, 08:22 AM
  2. Does anyone know what I am doing wrong?
    By Scampula in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 12-05-2003, 04:12 AM
  3. The ? char code is not working
    By Marker0077 in forum Setup Factory 6.0
    Replies: 7
    Last Post: 06-21-2003, 04:04 PM
  4. Could someone explain FILE > EXECUTE > working directory
    By Corey in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 12-12-2002, 09:13 AM
  5. NEED HELP ON A MESSAGE AFTER A WRONG PASSWORD
    By dragon in forum AutoPlay Menu Studio 3.0
    Replies: 0
    Last Post: 02-21-2002, 11:11 PM

Posting Permissions

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