Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 12 of 12
  1. #1
    Join Date
    Dec 2004
    Posts
    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.

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    System.GetOSVersionInfo

  3. #3
    Join Date
    Dec 2004
    Posts
    75
    Quote 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.

  4. #4
    Join Date
    Dec 2004
    Posts
    75
    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")

  5. #5
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Quote 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

  6. #6
    Join Date
    Dec 2004
    Posts
    75
    Quote 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.

  7. #7
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    ... and TJ-Tigger would have you believe he is not a programmer.

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

    Intrigued

  8. #8
    Join Date
    Dec 2004
    Posts
    75
    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

  9. #9
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Quote 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();
    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 at 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

  10. #10
    Join Date
    Dec 2004
    Posts
    75
    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.

  11. #11
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    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

  12. #12
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    ... 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.

Posting Permissions

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