Is it possible Pt.2

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • clientele
    Forum Member
    • Dec 2004
    • 75

    Is it possible Pt.2

    I have a project that has buttons that lead to functions that dont work in Win2000/NT at all. Is there way my project can detect what operating system its launched in, and disable those buttons when in a 2000/NT enviroment and enable again when in xp/98/me. thanks.
  • Worm
    Indigo Rose Customer
    • Jul 2002
    • 3971

    #2
    System.GetOSVersionInfo

    Comment

    • clientele
      Forum Member
      • Dec 2004
      • 75

      #3
      Originally posted by Worm
      System.GetOSVersionInfo
      Thanks for the quickness, I will try it when I get home and let you know how it goes.

      Comment

      • clientele
        Forum Member
        • Dec 2004
        • 75

        #4
        Worm (or anybody else) would you be so kind as to show me a code to use that action to hide a button if the operating system is is not present and vise versa, thanks.

        This is what I could fiqure out so far, but im not sure if thats gonna get me anywhere.

        OS_versioninfo = System.GetOSversioninfo()
        if (OS_versioninfo=="Windows XP") or (OS_versioninfo=="Windows ME") or (OS_versioninfo=="Windows 98")

        Comment

        • TJ_Tigger
          Indigo Rose Customer
          • Sep 2002
          • 3159

          #5
          Originally posted by clientele
          Worm (or anybody else) would you be so kind as to show me a code to use that action to hide a button if the operating system is is not present and vise versa, thanks.

          This is what I could fiqure out so far, but im not sure if thats gonna get me anywhere.

          OS_versioninfo = System.GetOSversioninfo()
          if (OS_versioninfo=="Windows XP") or (OS_versioninfo=="Windows ME") or (OS_versioninfo=="Windows 98")
          Code:
          OS_versioninfo = System.GetOSName
          if OS_versioninfo == "Windows XP" then
               Button.SetVisible("ButtonXP", true);
               Button.SetVisible("Button98", false);
          elseif OS_versioninfo == "Windows 98" then
               Button.SetVisible("ButtonXP", false);
               Button.SetVisible("Button98", true);
          elseif OS_versioninfo == "" then
               Dialog.Message("Error", "There was an error.");
          end
          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

          • clientele
            Forum Member
            • Dec 2004
            • 75

            #6
            Originally posted by TJ_Tigger
            Code:
            OS_versioninfo = System.GetOSName
            if OS_versioninfo == "Windows XP" then
                 Button.SetVisible("ButtonXP", true);
                 Button.SetVisible("Button98", false);
            elseif OS_versioninfo == "Windows 98" then
                 Button.SetVisible("ButtonXP", false);
                 Button.SetVisible("Button98", true);
            elseif OS_versioninfo == "" then
                 Dialog.Message("Error", "There was an error.");
            end
            ???? you guys are good. Thanks a ton. If I become rich one day I will not forget you guys.

            Comment

            • Intrigued
              Indigo Rose Customer
              • Dec 2003
              • 6138

              #7
              ... and TJ-Tigger would have you believe he is not a programmer.

              "Dat'boy got'sum skillz dare! Dats'fur sur!"

              Intrigued

              Comment

              • clientele
                Forum Member
                • Dec 2004
                • 75

                #8
                I ran the code below on a XP system but the buttons still showed up, is there something wrong In the code pls let me know thanks.

                OS_versioninfo = System.GetOSName
                if OS_versioninfo == "Windows XP" then
                Button.SetVisible("Buttonxp1", false);
                Button.SetVisible("Buttonxp2", false);
                elseif OS_versioninfo == "Windows 98" then
                Button.SetVisible("Buttonxp1", true);
                Button.SetVisible("Buttonxp2", true);
                elseif OS_versioninfo == "Windows Me" then
                Button.SetVisible("Buttonxp1", true);
                Button.SetVisible("Buttonxp2", true);
                elseif OS_versioninfo == "Windows 2000" then
                Button.SetVisible("Buttonxp1", false);
                Button.SetVisible("Buttonxp2", false);
                elseif OS_versioninfo == "Windows NT" then
                Button.SetVisible("Buttonxp1", false);
                Button.SetVisible("Buttonxp2", false);
                end

                Comment

                • TJ_Tigger
                  Indigo Rose Customer
                  • Sep 2002
                  • 3159

                  #9
                  Originally posted by clientele
                  I ran the code below on a XP system but the buttons still showed up, is there something wrong In the code pls let me know thanks.
                  That is what I get for not typing the code in AMS first. Sorry I forgot a couple of ().

                  Code:
                  OS_versioninfo = System.GetOSName[color=red]();[/color]
                  if OS_versioninfo == "Windows XP" or OS_versioninfo == "Windows 2000" or OS_versioninfo == "Windows NT 4" OS_versioninfo == "Windows NT 3" then
                  	Button.SetVisible("Buttonxp1", false);
                  	Button.SetVisible("Buttonxp2", false);
                  elseif OS_versioninfo == "Windows 98" or OS_versioninfo == "Windows ME" then
                  	Button.SetVisible("Buttonxp1", true);
                  	Button.SetVisible("Buttonxp2", true);
                  end
                  I tried to combine a couple of the checks since you were performing the same action for different OS versions. Let me know if that works for you.
                  Last edited by TJ_Tigger; 12-15-2004, 08:52 PM.
                  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

                  • clientele
                    Forum Member
                    • Dec 2004
                    • 75

                    #10
                    Once again thanks for takin your time and helping me out..It works!!!!! I think that irons out every single problem Ive had. This is the best program I think I have ever used. thanks again.

                    Comment

                    • TJ_Tigger
                      Indigo Rose Customer
                      • Sep 2002
                      • 3159

                      #11
                      no problemo
                      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

                      • Corey
                        Indigo Rose Staff Alumni
                        • Aug 2002
                        • 9745

                        #12
                        ... and TJ-Tigger would have you believe he is not a programmer.

                        "Dat'boy got'sum skillz dare! Dats'fur sur!"
                        Amen. I can testify to that. I'm just glad he isn't after my job.

                        Comment

                        Working...
                        X