SavePrefs(prefs[, t])
prefs
, containing user preferences for your application, to
an external file. You can then load these preferences back into your program the next
time your program is started by using the LoadPrefs() function.
The actual location where the preferences file will be stored is platform-dependent.
Note that this function will only work if you have specified a unique identifier for your application by using the @APPIDENTIFIER preprocessor command. See APPIDENTIFIER for details.
Starting with Hollywood 9.0, this function accepts a new optional table argument that can be used to specify further options.
The following tags are currently recognized in the optional table argument:
Adapter:
xml
) or it can be one of the following inbuilt
serializers:
Default:
Inbuilt:
If the Adapter
tag isn't specified, it will default to the default set
using SetDefaultAdapter().
UserTags:
@APPIDENTIFIER "com.airsoftsoftwair.example" prf = {lastfile$ = "test.txt", lastxpos = 100, lastypos = 200} SavePrefs(prf)This saves the table
prf
to a platform-dependent location. At the next program
start you can load the preferences by using the LoadPrefs()
function. See LoadPrefs for details.