%U_SAVELOG
Save an initialization setting to synergy.ini or synuser.ini
WTSupported in traditional Synergy on Windows
|
|
|
|
status = %U_SAVELOG(setting_name, [value], [section][, all_users])
or
xcall U_SAVELOG(setting_name, [value], [section][, all_users])
Return value
status
On Windows, true if the function is successful, or false if it is not. On UNIX, always returns false. On OpenVMS, always returns true. (^VAL)
Arguments
setting_name
The name of the initialization setting. (a)
value
(optional) The value to save for the logical. (a or n)
section
(optional) The section of the initialization file you want to save the setting in. (a)
all_users
(optional) One of the following: (n)
TRUE = Save initialization setting to synergy.ini.
FALSE = Save initialization setting to synuser.ini. (default)
Discussion
U_SAVELOG writes an initialization setting (setting_name and value) to synergy.ini or synuser.ini. The setting does not take effect until the next time the runtime is started. (Chaining does not cause Toolkit to re-read synergy.ini or synuser.ini.) If the function fails, which causes status to be returned as false, you can use %SYSERR to retrieve the system-specific error code.
If value is numeric, it is converted to a string. If value is not passed, the current value of the initialization setting, setting_name, is used.
If “synergy” is specified for section, this symbol will apply to all Synergy programs and tools. If a program name is passed, it will only apply to that program. If section is not passed, the name of the currently executing .dbr file is used. Section is case insensitive. If section doesn’t exist, it will be created.
If the file (synergy.ini or synuser.ini) Toolkit is attempting to write to does not exist, it will be created. The synergy.ini file will be created in the directory specified by SFWINIPATH if it’s set. If this variable isn’t set, synergy.ini will be created in the directory specified by DBLDIR. The synuser.ini file will be created in the user’s application data directory. For more information, see Synergy initialization files.
Examples
The following example writes the initialization setting “APP_STATE=MAXIMIXED” to the [synergy] section of synuser.ini. (Note that all_users isn’t passed.)
xcall u_savelog("APP_STATE", "MAXIMIZED", "synergy")