Scripting

Here you will find javascript snippets that performs one certain small task for learning and application

Repositories

Functions

//String
indexOf() // gets index of character
split("delimiter") // Split a string into an array of substrings:
length //Return the number of characters in a string
match // Search a string for "ain":
slice() // remove characters from front

// Arrays 
splice() // add elementsto array
toString() // convert to string 

//REGEX
\t // tab
\n // line
\r // carriage return
\s // whitespace


Ref: https://www.w3schools.com/jsref/jsref_replace.asp

Useful Extendscript references

Item

Code

Alert

alert("This is an alert")

Select

openDialog("Please select files")

Open file

var spreadsheet = File("/Users/ddu/Desktop/spreadsheet.csv");

Open (Prompt)

var spreadsheet = File.openDialog("Please select .csv file");

Read

var readOK = spreadsheet.open("r");

Prompt (with default value)

var value = prompt("What is the value", 10," This is the title");

Basics

How to use Menu Commands

Solid Layer

Adjustment Layer

Text layer

More details:http://docs.aenhancers.com/layers/textlayer/#textlayer

Shape layer

Folder creation

Instance of

Check if

Limitations

indexOf()

Removing

Effects property group [1]

Expressions

Randomize [1]

Position

Misc

Duplicate selected n times

Kbar Scriptlets

Changes selected Solid source's color to white

Source: Paul Tuersley, https://aenhancers.com/viewtopic.php?t=65

Change comp bg color to black > white > grey

Arrays

Shuffle

Last updated

Was this helpful?