Copy link to clipboard
Copied
I am writing a jsx script.
I would like to save what is written in edit text, etc., to a project file.
Is there a better way to do this?
I am having trouble with "app.settings.saveSetting" because it saves to preferences, so I can't have different data for each project file.
You need to use the project file's XMP packets.
You write data to the XMP of the project file and it sticks with it wherever it goes. Once written, there is no known way to delete XMP data unless you write over it with an empty string.
Copy link to clipboard
Copied
You can simply create a new file of whatever type you choose using newFile() and all that jazz. Again, refer to the Scripting Guide.
Mylenium
Copy link to clipboard
Copied
Thanks.
But it is not the way I wanted it.
I don't want to add more files.
Is there any way to add more information to the aep file?
Copy link to clipboard
Copied
How much text are you talking about? You can add a comment (up to 15,999 bytes long) to each item in the project panel. Or, I guess you could create a special "Settings" comp, with a text layer that has your settings saved as a JSON object in the source text.
Copy link to clipboard
Copied
You need to use the project file's XMP packets.
You write data to the XMP of the project file and it sticks with it wherever it goes. Once written, there is no known way to delete XMP data unless you write over it with an empty string.
Copy link to clipboard
Copied
Thank you!
I was able to store any information using "app.project.xmpPacket".
Copy link to clipboard
Copied
Awesome! Glad this worked for you!