Andromo - Start Making Apps - Free Signup

Announcement

Collapse

New Forum Software

If you're here, you've found the new home for our forums. There will be some bugs to iron out, so thanks for your patience...
See more
See less

How to detect file.open error if no app?

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

  • 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
    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

    Comment


    • #3
      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

      Comment


      • #4
        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

        Comment


        • #5
          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

          Comment


          • #6
            Ah yes, oops, I missed where you mentioned standard version. :o Great tip CWRIGHT!

            Corey Milner
            Creative Director, Indigo Rose Software

            Comment


            • #7
              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!

              Comment


              • #8
                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

                Comment

                Working...
                X