Blitz3D Docs -> 2D - Category -> System -> SystemProperty
Parameters:property$ - system property information required (valid strings listed below)
Description:SystemProperty is used to 'find out' certain system-specific things that are external to the currently running program.
There are broadly two different uses for SystemProperty, one for finding out the location of certain folders on the Windows OS, and one for finding out the handles/objects being used by the Win32/DX APIs to run Blitz programs. These objects and handles can then be used via third party DLLs to add extra functionality to Blitz, although this is recommended for advanced users only.
Properties - folders:
systemdir - System folder
windowsdir - Windows folder
tempdir - Temp folder
appdir - Program Files folder
Properties - objects/handles:
Print "System folder location: " + SystemProperty ("systemdir") Print "Windows folder location: " + SystemProperty ("windowsdir") Print "Temp folder: " + SystemProperty ("tempdir") Print "Program was run from " + SystemProperty ("appdir")
| There are two more undocumented properties.|
The first is "cpu" which, as implemented, always returns "Intel". Not too useful.
The second is "os", which is much more useful. It returns one of "Windows NT 3.1", "Windows 95", "Windows 98", "Windows ME", "Windows 2000", "Windows XP", "Windows Server 2003", "Windows Vista", and "Windows 7". Given B3D's compatibility issues on newer systems, it might be useful to use this command to detect if the OS is Vista or 7, and before creating any graphics, let the user know that they should put the EXE in compatibility mode.
That is, if the program doesn't crash before user code even runs. :P
| . |
| SystemProperty( "os" ) gives me "Windows XP" on Windows 7 64-bit, but running in compatibility mode for Windows XP Service Pack 3.|
If I turn off compatibility then I get "Windows 7".
| Well! Much less useful then ;P |
Blitz3D Manual Forum
BlitzPlus Equivalent Command