Old 09-25-2018, 01:13 AM   #1
martyn
Human being with feelings
 
Join Date: Mar 2016
Posts: 3
Default Backup the preferences programmatically

Hi,

My goal is to write a script to backup and restore the preferences easily.
I'm totally new to ReaScript, I'm a programmer and I know Python and Lua. I've read the advanced API and I could not find a way to get all the preferences of the current session.

Is this could be possible ?
Thanks
martyn is offline   Reply With Quote
Old 09-25-2018, 01:47 AM   #2
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,964
Default

EDIT: What do you mean by "preferences of the current session"?

The preferences of REAPER and some extensions are stored in the .ini files located in the resource directory (you can use EnumerateFiles in Lua to find them). (Restoring them is another matter because some setting files can only be overwritten externally reliably when REAPER is closed.)
cfillion is offline   Reply With Quote
Old 09-26-2018, 08:03 AM   #3
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,629
Default

What kind of preferences are you referring to? Project Settings or the ones from the Preferences-dialog? Or from other dialogs?
And have you an example of a usecase, that you want to make work?

You can do a lot with config-variables AND(!) with storing the accompanying settings in the reaper.ini:
https://github.com/Ultraschall/ultra...umentation.txt

But they don't have all preferences available, so some aren't backupable.
And setting some of these settings doesn't mean, they run as expected. For example, you can set the current project-settings for mute/solo-states of the master track, but they will not be updated in the GUI(though they are set).
For that you need to work with accompanying actions.



Another tip: if you're new to ReaScript, you should first try to build some easier scripts to get a feeling for the goods and bads of ReaScript.
With some practical experience, working on your idea would be much much easier, (as config-variables are sometimes a pain in the butt).
The script-request-thread is a good starting point for ideas, which with you can learn to code your first scripts.
Meo-Ada Mespotine is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:06 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.