Announcement

Collapse
No announcement yet.

How to make AMS wait for a batch file to finish executing?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to make AMS wait for a batch file to finish executing?

    Hello when executing a batch I do it this way, the problem is that AMS does not wait for the bat file to finish executing, it immediately executes the following lines. How could I fix it without using application sleep? How can I make it continue once the .bat file has been closed. thank you guys


    Code:
    File.Run("AutoPlay\\Docs\\File.bat", "", "", SW_SHOWNORMAL, true);

  • #2
    Hi Dansy ,
    Welcome to the forum you a using a callback on File Run but not adding a variable for it's return
    Code:
    result = File.Run(_SourceFolder .."AutoPlay\\Docs\\File.bat", "", "", SW_SHOWNORMAL, true);
    
    if result then--if bat finishes then continue
    Dialog.Message("Notice", "Test Completed.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    end
    Here is an example
    Bat.apz
    Cheers

    Comment


    • #3
      Originally posted by colc View Post
      Hi Dansy ,
      Welcome to the forum you a using a callback on File Run but not adding a variable for it's return
      Code:
      result = File.Run(_SourceFolder .."AutoPlay\\Docs\\File.bat", "", "", SW_SHOWNORMAL, true);
      
      if result then--if bat finishes then continue
      Dialog.Message("Notice", "Test Completed.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
      end
      Here is an example
      [ATTACH]n307701[/ATTACH]
      Cheers
      ohh you're right thank you very much

      Comment

      Working...
      X