Save newfile readable by jsx

Upload Adobe Bridge Scripts, Download Adobe Bridge Scripts, Support for Individual Adobe Bridge Scripts

Moderators: Tom, Kukurykus

r4nd3r
Posts: 14
Joined: Fri Aug 05, 2016 12:29 pm

Save newfile readable by jsx

Post by r4nd3r »

How to save a new file and read it later, like a cache file that can be read even after turning off the computer.
User avatar
txuku
Posts: 136
Joined: Thu Jan 01, 1970 12:00 am

Re: Save newfile readable by jsx

Post by txuku »

Bonjour

with a batch command!? :)
r4nd3r
Posts: 14
Joined: Fri Aug 05, 2016 12:29 pm

Re: Save newfile readable by jsx

Post by r4nd3r »

Yes, I am writing a script on the bridge that adds keywords in numerical order.
With a selection of photos on the bridge, I apply the script.
the script adds keyword 01;
the next time you apply the script add keyword 02;
and if you turn off the computer and go back to the bridge, the script continues from the last number applied.
lumigraphics
Posts: 3
Joined: Tue Oct 31, 2017 7:53 pm

Re: Save newfile readable by jsx

Post by lumigraphics »

You can either write your own text file (plain text or XML) or use the built-in Bridge preferences feature. Its in the SDK.

var a = 5;
app.preferences.myValue = a;
alert(app.preferences.myValue.toString());
r4nd3r
Posts: 14
Joined: Fri Aug 05, 2016 12:29 pm

Re: Save newfile readable by jsx

Post by r4nd3r »

I got it

var path = '~/Documents/';
var filename = 'xxx.txt';

//Create File object
var file = new File(path + filename);

file.encoding = 'UTF-8';
file.open( "e");



I hadn't expressed myself well in English,
but that was what I wanted
Thank you.