ObjectType:system

From Lavish Software Wiki
Revision as of 16:28, 6 December 2010 by GliderPro (talk | contribs)
Jump to navigation Jump to search

Description

Members

  • string OS: Operating system identifier (e.g. Microsoft Windows XP)
  • uint MemoryUsage: Amount of memory used by this process (the uplink or session), in bytes
  • uint MemFree: Amount of free physical system RAM, in megabytes
  • uint MemTotal: Total amount of physical system RAM, in megabytes
  • string OSBuild: Operating system build identifier (e.g. 2600.xpsp_sp2_rtm040803-2158)
  • uint GetProcAddress[module,function]: Retrieves the address of an exported function, usually in a DLL. (Level of understanding: High)
  • uint TickCount: A timestamp given in milliseconds. This value does "wrap" every 46 days or so.
  • filepath CurrentDirectory: Current directory according to the operating system
  • uint APICall[]: This needs to be documented

Methods

  • APICall[]: This needs to be documented

Returns

Same as OS

Examples

Display system type

echo ${System}

Output
Microsoft Windows XP

Create a HUD element displaying memory information

HUD -add Memory 1,1 MemoryUsage:${System.MemFree}/${System.MemTotal} MB

Play a sound

method playSound(string s)
{
  SoundToPlay:Set[${s}]

  if ${LavishScript.RunningTime} > ${soundTimeDelay}
  {
    soundTimeDelay:Set[${LavishScript.RunningTime}+(${soundDelay}*1000)]
    System:APICall["${System.GetProcAddress["WinMM.dll","PlaySound"].Hex}",${SoundToPlay}.String,0,"Math.Dec[22001]"]
  }	
}

Operates On

none

See Also