|
Constants - System Constants |
Top Previous Next |
|
System info plays very important role in adjustments of your project to work on various end-user machines; depending on retrieved info, your project will be able to select most suitable presentation for current machine. In MMB, system constants hold screen, window, processor and memory info and these constants are used as parameters for script commands. For example: ScriptCommand(SystemConstant(),Param2) Script command will use system constant as it's first parameter. See descriptions of real script commands to find out which ones can accept this kind of parameters.
ScreenWidth() returns width of computer display in pixels as an integer value
Script example:
ScreenHeight() returns height of computer display in pixels as an integer value
Script example:
WorkAreaWidth() returns width of computer display work area in pixels as an integer value
Script example:
WorkAreaHeight() returns height of computer display work area in pixels as an integer value
Script example:
MouseX() returns X (horizontal) screen position of mouse in pixels as an integer value
Script example:
MouseY() returns Y (vertical) screen position of mouse in pixels as an integer value
Script example:
MouseLButton() MouseRButton() MouseMButton() returns a state of mouse buttons. If mouse button is pressed then return value is 1 otherwise 0. Script example: To Page Start code insert ScriptTimer, which will start a global MouseState detection script ScriptTimer("Timer1=Script","50") Create new script object called Script and insert the below code into it:
For more advanced example of mouse state detection procedure check the mousestatedetection.mbd example project.
WinVer() returns major, minor and build version of running Windows as string (text) value
Script example:
Returned value will be for e.g: 5.01.2600
UsingWinNT() returns integer (number) value having one of two available states:
Script example:
If WinNT family OS is present, returned value will be: 1
ScreenColors() returns number of colors currently being used by Windows & graphics card
Script example:
Returned value will be for e.g: 32
ProcType() returns manufacturer, type and speed of central processor unit (CPU) as string (text) value Script example:
Returned value will be for e.g: Intel (R) Pentium (R) 4 CPU 2.40 GHz
ProcFreq() returns speed of central processor unit (CPU) in MHz as an integer (number) value Script example:
Returned value will be for e.g: 2405
GetMemory() returns quantity of Total and Free RAM memory as string (text) values.
Script example:
Returned value will be for e.g: 512/231 (first value represents Total Memory, second Free Memory)
|