Make a simple name for file path

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
huavancuong098
Posts: 2
Joined: May 16th, 2020, 6:06 pm

Hi everybody, I'm new with extendscript and when i scripting have some problem. I want to make a script can apply my preset to layer but when I create file path to dropdown list. It's create a long name with path.
Image

Can you help me to create a name for long file path and conect with ffx file locate in this folder?

Code: Select all

var path1 = "Macintosh HD/Users/mac/Desktop/develope Ae/ae scripting/preset/opacity key.ffx"
var path2 = "Macintosh HD/Users/mac/Desktop/develope Ae/ae scripting/preset/opacity key 2.ffx"
var path3 = "Macintosh HD/Users/mac/Desktop/develope Ae/ae scripting/preset/opacity key 3.ffx"
var preset1 = new File (path1);
var preset2 = new File (path2);
var preset3 = new File (path3);


var mainWindow = new Window("palette", "Dr.Motion", undefined); 

var groupPreset = mainWindow.add ("group");
groupPreset.orientation = "row";
groupPreset.add ("statictext", undefined, "Preset:"); 
var myDropdown = groupPreset.add ("dropdownlist", undefined, [preset1,preset2,preset3]);

var buttonGroup = mainWindow.add ("group");
buttonGroup.add ("button", undefined, "Apply");
buttonGroup.add ("button", undefined, "Cancel");

mainWindow.show ();

Thank you for your help. Sorry for my bad english.

Post Reply