Обычно используются файлы ini.
Запись:
CODE:external (INT, "WriteINI", "WritePrivateProfileStringA", "kernel32.dll");
string Path = pathfolder()+"settings.ini";
string auth_type = "mgl";
int check_tasks = 0;
int check_mag = 1;
WriteINI("Settings", "auth_type", auth_type, Path);
WriteINI("Settings", "check_tasks", format(check_tasks), Path);
WriteINI("Settings", "check_mag", format(check_mag), Path);
start(Path);
Чтение:
CODE:external (INT, "ReadINI", "GetPrivateProfileStringA", "kernel32.dll");
string Path = pathfolder()+"settings.ini";
char arr[256];
ReadINI("Settings", "auth_type", 0, address(#arr[0]), sizearray(arr), Path);
string auth_type = format(#arr[0]);
ReadINI("Settings", "check_tasks", 0, address(#arr[0]), sizearray(arr), Path);
int check_tasks = formatsn(format(#arr[0]));
ReadINI("Settings", "check_mag", 0, address(#arr[0]), sizearray(arr), Path);
int check_mag = formatsn(format(#arr[0]));
messagebox(auth_type);
messagebox(check_tasks);
messagebox(auth_type);
|