• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to save additional information in script

Participant ,
Sep 03, 2023 Sep 03, 2023

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.

TOPICS
How to , Scripting

Views

387

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Sep 03, 2023 Sep 03, 2023

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.

Votes

Translate

Translate
LEGEND ,
Sep 03, 2023 Sep 03, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 03, 2023 Sep 03, 2023

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 03, 2023 Sep 03, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 03, 2023 Sep 03, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 04, 2023 Sep 04, 2023

Copy link to clipboard

Copied

Thank you!
I was able to store any information using "app.project.xmpPacket".

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 04, 2023 Sep 04, 2023

Copy link to clipboard

Copied

LATEST

Awesome!  Glad this worked for you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines