Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3

Thread: timer actions

  1. #1
    Join Date
    Feb 2003
    Location
    Hertfordshire - UK
    Posts
    172

    timer actions

    Hi all,

    I have a small app that i am writing that uses enumerate process to see if a particular program is running, and performs an action when it stops.

    This works by checking that the process is started by clicking a button, but I think i need a timer to keep polling to see when the application is no longer running. Can anybody give me a clue as to how to do this? I have looked at some of the timer options and am struggling to see how to implement this.

    thanks in advance.
    With our fists clenched,
    We cannot shake hands

  2. #2
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    Just start your timer, for example, at the On Show event -

    Page.StartTimer(1000);

    Then in the On Timer event, put your code that you want after the conditions are met - this is in the help file -

    instances_of_file = 0;
    file_to_check_for = "yourprocess.exe";
    processes = Window.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
    --fire your event here
    end
    end

    Many ways to do this, but this way will do the trick. HTH.

  3. #3
    Join Date
    Feb 2003
    Location
    Hertfordshire - UK
    Posts
    172
    nice one. I kinda hacked out some code from the example and some of your previous good advice.

    Thanks for your time.

    Rich
    With our fists clenched,
    We cannot shake hands

Similar Threads

  1. Multiple timer actions
    By yosik in forum AutoPlay Media Studio 5.0
    Replies: 16
    Last Post: 03-22-2004, 02:36 AM
  2. Using Timer Events
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-22-2003, 02:14 PM
  3. Replies: 14
    Last Post: 06-24-2003, 04:21 AM
  4. feedback on existing actions
    By yosik in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 11-08-2002, 05:24 AM
  5. HOWTO: Uninstall a Shortcut Created with Actions
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 09-25-2002, 09:50 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