Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | MioScript | reg.readValue SEARCH    

  Functions
reg.createKey.ROOT
reg.deleteKey.ROOT
reg.deleteValue.ROOT
reg.read.ROOT
reg.readValue
reg.write.ROOT
reg.writeValue

  MioScript Reference
> Statements
app...
browser...
dialog...
disk...
draw...
extern...
filename...
keyboard...
menu...
mio...
mouse...
num...
path...
pushButton...
reg...
RS232...
sci...
screen...
shortcut...
sound...
str...
system...
time...
var...
window...

Function
reg.readValue

Language: MioScript
Product: MioFactory


Syntax

reg.readValue(productID, name, value)


Parameters

PIDproductIDOptional.
Product ID.
If set to null, the Id of the current application is used.
STRINGnameName as used when the value was saved with reg.writeValue.
STRINGvalueDefault value returned if the name was not found in the registry database.


Return value

Value.



Description

Reads a value from the registry database.

See also: reg.writeValue.

Info: The value is read from HKEY_LOCAL_MACHINE if the user is administrator, or from HKEY_CURRENT_USER if the user is not administrator.
For more information: system.userIsAdmin.

Note: This function is defined in the library klib.k and is linked automatically.




MioScript Sample Code

// Read
&result = reg.readValue("{APP_ID}", "MyValue", "Not found!")
alert(&result)

// Write
reg.writeValue("{APP_ID}", "MyValue", "This is a value")

// Read again
&result = reg.readValue("{APP_ID}", "MyValue", "Not found!")
alert(&result)