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

How to replace the foreground color for hexadecimal code from a text file?

Engaged ,
Jan 18, 2019 Jan 18, 2019

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!

TOPICS
Actions and scripting

Views

577

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

correct answers 1 Correct answer

LEGEND , Jan 18, 2019 Jan 18, 2019

(fle = File(Folder.desktop + '/.txt')).open('w')

fle.write(foregroundColor.rgb.hexValue), fle.close()

Votes

Translate

Translate
Adobe
LEGEND ,
Jan 18, 2019 Jan 18, 2019

Copy link to clipboard

Copied

(fle = File(Folder.desktop + '/.txt')).open('w')

fle.write(foregroundColor.rgb.hexValue), fle.close()

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
Engaged ,
Jan 18, 2019 Jan 18, 2019

Copy link to clipboard

Copied

LATEST

So fast!! Great, it worked very well.

Thank you Kukurykus

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