T Tegwin Member Licensed User Longtime User Dec 10, 2013 #1 Hello, looking for how to write an app that does various things based on the OS.. Such as if its Windows make the background red or if Mac make it blue .. that kind of thing. Any ideas how to do this Thanks Chris
Hello, looking for how to write an app that does various things based on the OS.. Such as if its Windows make the background red or if Mac make it blue .. that kind of thing. Any ideas how to do this Thanks Chris
Erel B4X founder Staff member Licensed User Longtime User Dec 11, 2013 #2 Here: B4X: Dim os As String = GetSystemProperty("os.name", "").ToLowerCase Log(os) If os.Contains("win") Then Else If os.Contains("mac") Then Else 'linux End If Upvote 0
Here: B4X: Dim os As String = GetSystemProperty("os.name", "").ToLowerCase Log(os) If os.Contains("win") Then Else If os.Contains("mac") Then Else 'linux End If
Theera Well-Known Member Licensed User Longtime User Dec 18, 2013 #3 Hi Erel, It is better,if this feather in B4J itself. Because we don't guess , which OS is user selected to use based on? Upvote 0
Hi Erel, It is better,if this feather in B4J itself. Because we don't guess , which OS is user selected to use based on?
Erel B4X founder Staff member Licensed User Longtime User Dec 18, 2013 #4 Not sure. You can easily compile this code to a custom "utilities" library if you like. Upvote 0