Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2008
    Posts
    182

    Checking for unexpected error!

    Hi, AMS is the best by FAR! unfortunately I did stuff years ago on another CRAP program with a very unstable runtime! No the client wants it and it is way.. to much work to redo in AMS. soo... I use AMS as frame to run the older "player.exe" application, but now and then PLAYER crashes and gives me the
    """"An unexpected error occurred...click CANCEL or SEND report""""""""""
    and just sits there without going back to AMS

    Is there any way to have AMS be on the lookout for this and restart the app if it happens???

    I have :

    file_to_check_for = "player.exe";

    --------debugging helper
    StatusDlg.Show();
    StatusDlg.SetMessage(" PLEASE WAIT..............");
    Page.StopTimer(num_Interval);
    -- now run the program (WaitForReturn = false)
    File.Run(_DesktopFolder.."\\OLDER\\SOFTWARE\\eXPOR T\\PLAYER.EXE", "", "", SW_SHOWNORMAL, false);

    -- here until we see the process active----
    repeat
    found = false;
    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
    found = true;
    end
    end
    Application.Sleep(500);
    until (found == true);

    -- Update debug
    StatusDlg.SetMessage("FINISHED,PLEASE WAIT..............");

    -- Now the process is running, wait for it to end------------
    repeat
    active = false;
    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
    active = true;
    end
    end

    Application.Sleep(500);
    until (active == false);
    Last edited by ronwilliams; 05-28-2009 at 05:20 AM.

  2. #2
    Join Date
    Jun 2008
    Posts
    182
    I think what I am looking for is " something to check the STATUS of a TASK or APPLICATION. If it is Running then OK, if it is NOT RESPONDING then FALSE

    or check the status EnumerateProcesses(); ?
    Last edited by ronwilliams; 05-28-2009 at 07:07 AM.

  3. #3
    Join Date
    Jun 2008
    Posts
    182
    Anybody have any idea on this?

  4. #4
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    It is likely that you would get more responses if you tabbed your code. If you could post your existing code (from the old player and AMS) we might be able to help a bit more. With all of the plugins and dlls floating around, it might be easier than you think to remake the entire project in AMS.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

Similar Threads

  1. Including CrystalReport VS2005
    By Calisana in forum MSI Factory 2.0 Discussion
    Replies: 3
    Last Post: 03-17-2009, 09:28 AM
  2. Error message dialog
    By MathiasvK in forum AutoPlay Media Studio 7.5
    Replies: 7
    Last Post: 05-11-2008, 08:50 AM
  3. Error Checking Advice
    By pjborg in forum AutoPlay Media Studio 6.0
    Replies: 3
    Last Post: 04-01-2006, 11:33 AM
  4. ZipExtract "callback" error
    By Darwin in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 02-21-2005, 06:34 PM
  5. SUF6.0.0.2 -- installer hangs.
    By jassing in forum Setup Factory 6.0
    Replies: 4
    Last Post: 12-19-2001, 11:28 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