Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005
    Location
    Howell, MI
    Posts
    22

    Wait for return of Shell.Execute

    Is there a way to wait for the return of shell.execute before moving on?
    I am sure everyone has needed this, so it must be easy to trap for but I can't find any example code. I want to be able to use checkboxes to pick what options to run (on shutdown) then run them in order. The code is all in place but my software uses a serial port, therefore one session must be complete before the next one starts. I do not want to use sleep or delays I want to wait for positive feedback that the first job is done before launching another.

    Here is my code:

    if (RACKSLOT1D) then

    Shell.Execute(SessionVar.Expand("%AppFolder%\\firm ware\\fwloader.exe"), "open", "/firmtype DIM /serial "..sRACKNUMBER.." /connection serial /port "..sCOMPORT.." /firstslot 1 /lastslot 1 /filename tdas3_dim_256_hw127_v0100.ahx /quit Y", "%AppFolder%\\firmware", SW_SHOWNORMAL);

    end

    if (RACKSLOT1S) then

    Shell.Execute(SessionVar.Expand("%AppFolder%\\firm ware\\fwloader.exe"), "open", "/firmtype SIM /serial "..sRACKNUMBER.." /connection serial /port "..sCOMPORT.." /firstslot 1 /lastslot 1 /filename tdas3_sim_256_hw127_v07e4.ahx /quit Y", "%AppFolder%\\firmware", SW_SHOWNORMAL);

    end

    if (RACKSLOT1T) then

    Shell.Execute(SessionVar.Expand("%AppFolder%\\firm ware\\fwloader.exe"), "open", "/firmtype TOM /serial "..sRACKNUMBER.." /connection serial /port "..sCOMPORT.." /firstslot 1 /lastslot 1 /filename tdas3_tom_256_v01c6.ahx /quit Y", "%AppFolder%\\firmware", SW_SHOWNORMAL);

    end

  2. #2
    Join Date
    Sep 2004
    Posts
    60
    Shell.Execute does not have a wait for return option, File.run does.

  3. #3
    Join Date
    Jan 2005
    Location
    Howell, MI
    Posts
    22

    Worked Great

    Quote Originally Posted by Absynthe
    Shell.Execute does not have a wait for return option, File.run does.
    Thanks that worked great

Similar Threads

  1. Wait dialog while another app loads?
    By amaru96 in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 09-02-2003, 06:34 PM
  2. "Wait For Program to Finish" is not functional in AMS 4.0 Trial?
    By datron in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 06-05-2003, 04:30 PM
  3. wait?
    By dk237 in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 09-28-2002, 07:49 AM
  4. "Wait for Return" not working
    By davidangell in forum AutoPlay Menu Studio 3.0
    Replies: 1
    Last Post: 02-13-2002, 10:30 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