It is currently Mon Aug 19, 2019 3:43 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 48 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: How can I detect what OS version is running from?
PostPosted: Sun Mar 07, 2004 8:12 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 07, 2004 8:47 am
Posts: 1857
Location: Argentina
I need to detect if the OS that my appl is running from is WINXP or olders.. etc.. This is because some of the features will be different in code but same in function for the user, you know what I mean? some older OS' has problems with some code that works at newer OS'.. and vice versa..
how to detect?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 07, 2004 8:29 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 5:21 pm
Posts: 5780
Location: Germany
Have a look at the OSVersion() command in the help file.

Timo

_________________
quidquid Latine dictum sit altum videtur


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 07, 2004 8:41 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 07, 2004 8:47 am
Posts: 1857
Location: Argentina
Ahhh thx

I tryed:
Debug OSVersion()


And it showed: 60

???? I don't get it..


_
Running on winxp pro.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 07, 2004 8:49 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Fri Apr 25, 2003 6:41 pm
Posts: 1356
RTFM!












(Because i think, you dont understand: Read the fucking manual)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 07, 2004 8:56 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 7:24 pm
Posts: 449
Location: Germany
*lol*, hehe!

Looks like you are a noob, dagcrack. Seriously, reading the manual helps. You can also take a look at some tutorials available at http://www.reelmediaproductions.com/pb.

Greetz!

_________________
The truth is never confined to a single number - especially scientific truth!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 07, 2004 9:01 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 07, 2004 8:47 am
Posts: 1857
Location: Argentina
I didnt had time for reading it... and dont call me noob cause you'll know how noob I am jeez. :evil:


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 07, 2004 9:03 pm 
Offline
Always Here
Always Here
User avatar

Joined: Sat Aug 30, 2003 5:58 pm
Posts: 5883
Location: Denmark
newbie is better. I also ask some pretty stupid questions myself :)
Welocme.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 07, 2004 9:03 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Oct 10, 2003 12:42 am
Posts: 346
Location: Tampa,FL,USA
Let us embrace the newbs and teach them. After all, we were all newbs at one point. :)

_________________
>>> http://treebolt.xentek.net/newsite


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 07, 2004 9:07 pm 
Offline
Always Here
Always Here
User avatar

Joined: Sat Aug 30, 2003 5:58 pm
Posts: 5883
Location: Denmark
can i ask a pretty stupid question?

When debug osversion() says 60, is it just the number of the constant or
what it returns? I know how to use it via the "IF" or via "Select case" or something else.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 07, 2004 9:20 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 7:24 pm
Posts: 449
Location: Germany
Code:
Debug #PB_OS_Windows_XP
Debug OSVersion()


If your Os is not WinXP, change it to the according constant.

@degrack: Sorry for noob, of course i meant newbie or 'unexperienced user'. You're right, noob is the wrong word.

_________________
The truth is never confined to a single number - especially scientific truth!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 07, 2004 9:24 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Oct 10, 2003 12:42 am
Posts: 346
Location: Tampa,FL,USA
Here, mabe this will help:

Code:
Procedure.l GetOSVersion()
  ;If this procedure retruns 1, then the os is - Windows NT3 51
  ;If this procedure retruns 2, then the os is - Windows 95
  ;If this procedure retruns 3, then the os is - Windows NT 4
  ;If this procedure retruns 4, then the os is - Windows 98
  ;If this procedure retruns 5, then the os is - Windows ME
  ;If this procedure retruns 6, then the os is - Windows 2000
  ;If this procedure retruns 7, then the os is - Windows XP
  ;If this procedure retruns 8, then the os is - Windows Future
  If OSVersion() = #PB_OS_Windows_NT3_51
    ProcedureReturn 1
  ElseIf OSVersion() = #PB_OS_Windows_95
    ProcedureReturn 2
  ElseIf OSVersion() = #PB_OS_Windows_NT_4
    ProcedureReturn 3
  ElseIf OSVersion() = #PB_OS_Windows_98
    ProcedureReturn 4
  ElseIf OSVersion() = #PB_OS_Windows_ME
    ProcedureReturn 5
  ElseIf OSVersion() = #PB_OS_Windows_2000
    ProcedureReturn 6
  ElseIf OSVersion() = #PB_OS_Windows_XP
    ProcedureReturn 7
  ElseIf OSVersion() = #PB_OS_Windows_Future
    ProcedureReturn 8
  EndIf
EndProcedure

_________________
>>> http://treebolt.xentek.net/newsite


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 07, 2004 9:31 pm 
Offline
Always Here
Always Here
User avatar

Joined: Sat Aug 30, 2003 5:58 pm
Posts: 5883
Location: Denmark
thanks


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 07, 2004 9:58 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 07, 2004 8:47 am
Posts: 1857
Location: Argentina
@ merendo
I'm not DEGCRACK, at least try to write my nick as it is :D as I did (emh... Ctrl C Ctrl V :P)

I am just new at this forum.
About PB I started a month ago I call my self a beginner at it.

Dont think that you're the best one... cause you'll end knowing you're no one. (hey I heard that phrase somewhere..)

Don't talk for the others please. :x

@GPI
Why you had to say badwords just for that? :(



Hey well I liked this forum, my name is Gus I'm 17. I have some knowladge of VB B+ B3D and now learning PB. And... I will never call my self an ace guy... and plus.. I will never say "you're a noob!!" cause that's the sad part... shows how lame you are sometimes... well anyway I gotta go, I'm busy at work so we talk later.. BTW.. I did read that part of the manual already :lol: :!:

Hey is there any thread where you guys shows your desktops (real ones.. desks.. your job environment ? ) cause its a funny idea to know how you work.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 07, 2004 10:28 pm 
Offline
Moderator
Moderator

Joined: Sat Dec 27, 2003 3:55 am
Posts: 3321
Location: Great Southern Land
Howdy dagcrack,

Seems you got a rather warm-ish welcome from some. :)

Welcome aboard.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Mar 08, 2004 12:04 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 6:03 pm
Posts: 3000
Location: Lincoln, UK
Quote:
I didnt had time for reading it

C'mon man you've got to help yourself too! otherwise how will you learn?

_________________
--Kale

Image


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 48 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye