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

Script for creating curves adjustment presets from spreadsheet?

New Here ,
Apr 11, 2019 Apr 11, 2019

Copy link to clipboard

Copied

I need to create hundreds of curves adjustment presets. I have a spreadsheet containing the what the preset needs to be saved as (named) in one column and what the RGB output values need to be in another 3 separate columns. The input value for all is 65. Rather than building them all by hand I was hoping to find a script to build them base off the values in the spreadsheet. Anyone have any suggestions?

TOPICS
Actions and scripting

Views

338

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
Adobe
People's Champ ,
Apr 11, 2019 Apr 11, 2019

Copy link to clipboard

Copied

LATEST

if (create_acv("~/Desktop", "test_preset", 100, 101, 102)) 

    alert("Done!");

function create_acv(path, name, r, g, b)

    {

    try {

        var data = String.fromCharCode(0,4, 0,5,

            0,2, 0,0,0,0, 0,255,0,255,

            0,3, 0,0,0,0, (r>>8)&255,r&255, 0,65, 0,255,0,255,

            0,3, 0,0,0,0, (g>>8)&255,g&255, 0,65, 0,255,0,255,

            0,3, 0,0,0,0, (b>>8)&255,b&255, 0,65, 0,255,0,255,

            0,2, 0,0,0,0, 0,255,0,255);

        var file  = new File(path  + "/" + name + ".acv");

        file.open("w");

        file.encoding = "BINARY";

        file.write(data);

        if (file.error) throw(file.error);

        file.close();

        return true;

        }           

    catch(e) { alert(e); return false; }

    }

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