how to hide text if certain app is detected...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • cbohlson
    Forum Member
    • Jan 2003
    • 4

    how to hide text if certain app is detected...

    One of my favorite things about AMS Version 2 was the ability to set up 2 different text "dialogues", one of which would be visible at runtime if a certain app (Acrobat, in this case) was detected in the registry of the end users computer. How in the heck do you do that in AMS4? I've tried repeatedly, but I can't find the proper combination of actions to duplicate my old front end page.

    Any help would be greatly appreciated.

    Bill
  • TJ_Tigger
    Indigo Rose Customer
    • Sep 2002
    • 3159

    #2
    Re: how to hide text if certain app is detected...

    You could try something like this on page initialize.

    Page.HideObject ("Text1")
    %pdfviewer% = "NOTFOUND"
    %pdfviewer% = File.GetDefaultViewer (".PDF")
    IF (%pdfviewer% = "NOTFOUND")
    Page.ShowObject ("Text1")
    END IF

    This sets the variable to "NOTFOUND" first and then checks to see if there is an application registered to open .pdf. If there is not one the variable %pdfviewer% will remain as "NOTFOUND" and you can show the object for installing the application. If it is not found the item will remain hidden.
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

    Comment

    • cbohlson
      Forum Member
      • Jan 2003
      • 4

      #3
      Re: how to hide text if certain app is detected...

      ooooooooo, cool, I'm gonna try that.
      Thank you very much.

      Comment

      • cbohlson
        Forum Member
        • Jan 2003
        • 4

        #4
        Re: how to hide text if certain app is detected...

        Hey TJ,
        I'm not real clever, but I'm not sure your solution is working. I tried it, and my object didn't appear at runtime. But as a sort of a test, I replaced all the "pdf" instances with "yyy" and got the same results, that being a hidden object. I know nothing about programming, but why wouldn't the 'if' statement be 'found', since you already have a 'notfound' in the command?

        Thanks,
        Bill

        Comment

        • TJ_Tigger
          Indigo Rose Customer
          • Sep 2002
          • 3159

          #5
          Re: how to hide text if certain app is detected...

          The properties I listed above you would want to put on Page Show or maybe Page Initialize. The "Text1" reference will be the name of the Text object or you could change it to a button instead. Let me put together a sample project for you to see if that helps.

          Give me a few minutes
          TJ-Tigger
          "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
          "Draco dormiens nunquam titillandus."
          Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

          Comment

          • TJ_Tigger
            Indigo Rose Customer
            • Sep 2002
            • 3159

            #6
            Re: how to hide text if certain app is detected...

            Give this a try.

            click here
            TJ-Tigger
            "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
            "Draco dormiens nunquam titillandus."
            Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

            Comment

            • cbohlson
              Forum Member
              • Jan 2003
              • 4

              #7
              Re: how to hide text if certain app is detected...

              TJ---Thanks very much! Your sample works great. That was very nice of you to go to all that trouble, and I really appreciate it.

              Bill

              Comment

              • TJ_Tigger
                Indigo Rose Customer
                • Sep 2002
                • 3159

                #8
                Re: how to hide text if certain app is detected...

                Not a problem, I am glad it worked for you.
                TJ-Tigger
                "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                "Draco dormiens nunquam titillandus."
                Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                Comment

                Working...
                X