Copy link to clipboard
Copied
Greetings everyone
This script changes the foreground color to the hexadecimal code from an external text file.
var fileToParse = File (Folder.desktop + '/Photoshop.txt');
fileToParse.open('r');
var NewColor = fileToParse.readln();
fileToParse.close();
app.foregroundColor.rgb.hexValue=NewColor;
Source: Set color from a .txt file?
My question is: How to save and replace the foreground color to the hexadecimal code in the external text file ??
Thank you!
(fle = File(Folder.desktop + '/.txt')).open('w')
fle.write(foregroundColor.rgb.hexValue), fle.close()
Copy link to clipboard
Copied
(fle = File(Folder.desktop + '/.txt')).open('w')
fle.write(foregroundColor.rgb.hexValue), fle.close()
Copy link to clipboard
Copied