Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2004
    Posts
    8

    How to detect file.open error if no app?

    I am about to purchase the standard edition, and want to know if when one tries the file.open on a pdf file, is there a way to detect if it launched correctly? Thereason is to establish if acrobat is installed on the target system. I know the pro version allows for checking, but for just this one event I am not sure about paying the cost difference in software.

    If there was a simple way to know if the file.open worked or failed then at least a message could be posted.

    Many thanks

    Stewart

  2. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi. About the file.open actions from the following page, "Returns
    Nothing. You can use Application.GetLastError to determine whether this action failed, and why.".

    http://www.indigorose.com/webhelp/am.../File.Open.htm

    So basically you would use this to figure out if it hadn't loaded properly:

    http://www.indigorose.com/webhelp/am...tLastError.htm

    Hope that helps. Glad to have you in the forum!

    Corey Milner
    Creative Director, Indigo Rose Software

  3. #3
    Join Date
    Jan 2004
    Posts
    8

    Thumbs up

    Thanks!

    I will probably check the variable number returned for a wide range of values so that if it failed one can then post a Dialog.Message appropriately to tell the user to check that Acrobat is installed.

    Regards,

    Stewart

  4. #4
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Sure. Or if you go to PROJECT > DEPENDENCIES you can set the requirement for Adobe Acrobat there also.

    Corey Milner
    Creative Director, Indigo Rose Software

  5. #5
    Join Date
    Jun 2002
    Posts
    42
    The File.GetDefaultViewer action is available in the standard edition. You could use this to check for the existance of a PDF viewing application. Something like:

    viewer_path = File.GetDefaultViewer(".pdf");

    if (viewer_path == "") then
    Dialog.Message("Notice", "There is no PDF viewer installed.");
    end

  6. #6
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Ah yes, oops, I missed where you mentioned standard version. Great tip CWRIGHT!

    Corey Milner
    Creative Director, Indigo Rose Software

  7. #7
    Join Date
    Jan 2004
    Posts
    8
    Excellent advice - tried it and everything looks fine now.

    Not sure if this thread is the correct place, but seeing how helpful you have been.....

    Does the 'standard' version differ from the trial? Just that on startup, the software seems to check for macromedia flash, yet I have used no flash objects at all in the show. I have looked through the entire project and there are no files with the .swf extension either.

    Can this be disabled or will it always show up regardless? Just that on many NT servers, this could be quite annoying everytime the runtime presentation starts.

    Thanks!

  8. #8
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi. Start a new, completely blank project. You will notice that there is now no flash check. Flash checks onlyoccur where you set them to... Hope that helps.

    Corey Milner
    Creative Director, Indigo Rose Software

Posting Permissions

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