LifeLua 30-05-2025
Documentation for LifeLua
Loading...
Searching...
No Matches
os

Lua OS library extension. More...

Functions

nil os.delay (number seconds)
 
nil os.exit ()
 
nil os.delaycb (number seconds)
 
nil os.uri (string uri, number flag)
 
nil os.shuttersound (SceShutterSoundType shuttertype)
 
nil os.infobar (SceAppMgrInfoBarVisibility state, SceAppMgrInfoBarColor color, SceAppMgrInfoBarTransparency transparency)
 
nil os.lock (boolean lock, SceShellUtilLockType type,...)
 
nil os.notification (string text)
 
nil os.videoexport (string path)
 
nil os.photoexport (string path)
 
nil os.musicexport (string path)
 
nil os.shutdown ()
 
nil os.standby ()
 
nil os.restart ()
 
string os.title ()
 
string os.titleid ()
 
nil os.closeapp (string titleid)
 
nil os.closeotherapps ()
 
nil os.execute (string path)
 
boolean os.isbatterylow ()
 
boolean os.unsafe ()
 
boolean os.appexists (string titleid)
 
nil os.installdir (string path)
 
nil os.appdelete (string titleid)
 
string os.launchparams ()
 
string os.importphoto (number r, number g, number b, number a)
 
nil os.abortimportphoto ()
 
number or nil os.cpu (number clock)
 
number or nil os.bus (number clock)
 
number or nil os.gpu (number clock)
 
number or nil os.xbar (number clock)
 
nil os.displayon ()
 
nil os.displayoff ()
 

Variables

SceShutterSoundType SCE_SHUTTER_SOUND_TYPE_SAVE_IMAGE
 
SceShutterSoundType SCE_SHUTTER_SOUND_TYPE_SAVE_VIDEO_START
 
SceShutterSoundType SCE_SHUTTER_SOUND_TYPE_SAVE_VIDEO_END
 
SceShellUtilLockType SCE_SHELL_UTIL_LOCK_TYPE_PS_BTN
 
SceShellUtilLockType SCE_SHELL_UTIL_LOCK_TYPE_QUICK_MENU
 
SceShellUtilLockType SCE_SHELL_UTIL_LOCK_TYPE_POWEROFF_MENU
 
SceShellUtilLockType SCE_SHELL_UTIL_LOCK_TYPE_UNK8
 
SceShellUtilLockType SCE_SHELL_UTIL_LOCK_TYPE_USB_CONNECTION
 
SceShellUtilLockType SCE_SHELL_UTIL_LOCK_TYPE_MC_INSERTED
 
SceShellUtilLockType SCE_SHELL_UTIL_LOCK_TYPE_MC_REMOVED
 
SceShellUtilLockType SCE_SHELL_UTIL_LOCK_TYPE_UNK80
 
SceShellUtilLockType SCE_SHELL_UTIL_LOCK_TYPE_UNK100
 
SceShellUtilLockType SCE_SHELL_UTIL_LOCK_TYPE_UNK200
 
SceShellUtilLockType SCE_SHELL_UTIL_LOCK_TYPE_MUSIC_PLAYER
 
SceShellUtilLockType SCE_SHELL_UTIL_LOCK_TYPE_PS_BTN_2
 
SceAppMgrInfoBarVisibility SCE_APPMGR_INFOBAR_VISIBILITY_INVISIBLE
 INFOBAR_VISIBILITY_INVISIBLE for short
 
SceAppMgrInfoBarVisibility SCE_APPMGR_INFOBAR_VISIBILITY_VISIBLE
 INFOBAR_VISIBILITY_VISIBLE for short
 
SceAppMgrInfoBarColor SCE_APPMGR_INFOBAR_COLOR_BLACK
 INFOBAR_COLOR_BLACK for short
 
SceAppMgrInfoBarColor SCE_APPMGR_INFOBAR_COLOR_WHITE
 INFOBAR_COLOR_WHITE for short
 
SceAppMgrInfoBarTransparency SCE_APPMGR_INFOBAR_TRANSPARENCY_OPAQUE
 INFOBAR_TRANSPARENCY_OPAQUE for short
 
SceAppMgrInfoBarTransparency SCE_APPMGR_INFOBAR_TRANSPARENCY_TRANSLUCENT
 INFOBAR_TRANSPARENCY_TRANSLUCENT for short
 

Detailed Description

Todo
Add the rest of the functions & variables

Function Documentation

◆ os.abortimportphoto()

nil os.abortimportphoto ( )

Aborts currently running photo import dialog

◆ os.appdelete()

nil os.appdelete ( string titleid)

Deletes an app

◆ os.appexists()

boolean os.appexists ( string titleid)

Checks if an app exists

◆ os.bus()

number or nil os.bus ( number clock)

Gets or sets the BUS' clock speed

◆ os.closeapp()

nil os.closeapp ( string titleid)

Closes a running app by its title ID

◆ os.closeotherapps()

nil os.closeotherapps ( )

Closes all of the other running apps

◆ os.cpu()

number or nil os.cpu ( number clock)

Gets or sets the CPU's clock speed

◆ os.delay()

nil os.delay ( number seconds)

Delay the app for a certain amount of time

Parameters
secondsThe number of seconds to delay (defaults to 0)

◆ os.delaycb()

nil os.delaycb ( number seconds)

Delay the app for a certain amount of time and handle any callbacks

Parameters
secondsThe number of seconds to delay (defaults to 0)

◆ os.displayoff()

nil os.displayoff ( )

Turns the display off

◆ os.displayon()

nil os.displayon ( )

Turns the display on

◆ os.execute()

nil os.execute ( string path)

Launches a SELF executable (eboot.bin)

Attention
SELF must be in the app partition

◆ os.exit()

nil os.exit ( )

Exits the app

◆ os.gpu()

number or nil os.gpu ( number clock)

Gets or sets the GPU's clock speed

◆ os.importphoto()

string os.importphoto ( number r,
number g,
number b,
number a )

Opens a photo import dialog

Remarks
This function can call LifeLuaPhotoImportDialog if it exists.
Parameters
aOptional, will default to 255 (0xFF)
Returns
Path of the photo

◆ os.infobar()

nil os.infobar ( SceAppMgrInfoBarVisibility state,
SceAppMgrInfoBarColor color,
SceAppMgrInfoBarTransparency transparency )

Sets the state of the infobar

◆ os.installdir()

nil os.installdir ( string path)

Installs a folder app (not a .VPK, but an app in a directory with what a .VPK includes)

◆ os.isbatterylow()

boolean os.isbatterylow ( )

Gets if the battery is low

◆ os.launchparams()

string os.launchparams ( )

Gets launch parameters

◆ os.lock()

nil os.lock ( boolean lock,
SceShellUtilLockType type,
... )

Locks some shell functionality (e. g. the PS button, the quick menu, the power off menu, USB connection etc.)

Note
After lock has been defined as a boolean, you can add as many SceShellUtilLockType values as you want as the next arguments
Example:
os.lock(true, SCE_SHELL_UTIL_LOCK_TYPE_PS_BTN, SCE_SHELL_UTIL_LOCK_TYPE_QUICK_MENU, SCE_SHELL_UTIL_LOCK_TYPE_USB_CONNECTION)

◆ os.musicexport()

nil os.musicexport ( string path)

Exports an audio (.mp3) file

◆ os.notification()

nil os.notification ( string text)

Sends a notification

◆ os.photoexport()

nil os.photoexport ( string path)

Exports a photo (.png, .jpg/.jpeg, .bmp) file

◆ os.restart()

nil os.restart ( )

Restarts the PS Vita

◆ os.shutdown()

nil os.shutdown ( )

Turns off the PS Vita completely

Note
os.suspend does the same thing

◆ os.shuttersound()

nil os.shuttersound ( SceShutterSoundType shuttertype)

Play a shutter sound

◆ os.standby()

nil os.standby ( )

Puts the PS Vita into standby

◆ os.title()

string os.title ( )

Gets the app's title

◆ os.titleid()

string os.titleid ( )

Gets the app's title ID

◆ os.unsafe()

boolean os.unsafe ( )

Checks if the app is in unsafe mode

◆ os.uri()

nil os.uri ( string uri,
number flag )

Opens an URI

Parameters
flagOptional, will default to 0xFFFFF if not set

◆ os.videoexport()

nil os.videoexport ( string path)

Exports a video (.mp4) file

◆ os.xbar()

number or nil os.xbar ( number clock)

Gets or sets the XBAR's clock speed