PDA

View Full Version : Is it possible Pt.2


clientele
12-15-2004, 02:02 PM
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
12-15-2004, 02:25 PM
System.GetOSVersionInfo

clientele
12-15-2004, 02:34 PM
System.GetOSVersionInfo

Thanks for the quickness, I will try it when I get home and let you know how it goes.

clientele
12-15-2004, 03:44 PM
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")

TJ_Tigger
12-15-2004, 06:03 PM
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")

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

clientele
12-15-2004, 06:36 PM
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.

Intrigued
12-15-2004, 07:23 PM
... and TJ-Tigger would have you believe he is not a programmer.

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

;)

clientele
12-15-2004, 09:28 PM
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

TJ_Tigger
12-15-2004, 09:50 PM
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 ().


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.

clientele
12-15-2004, 10:19 PM
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.

TJ_Tigger
12-15-2004, 10:21 PM
no problemo

Corey
12-15-2004, 10:46 PM
... 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. :)