Highlighted

Adobe script/java script string functions

Community Beginner ,
Oct 14, 2020

Copy link to clipboard

Copied

Hi i need to make a file name string variable to all lowercase letters i tried using the toLowerCase but i get a error saying the function toLowerCase doesnt exists.Do i need to download another library to manipulate strings or is this possible at all?Iam using version 21.2.4 of photoshop

Thanks

Adobe Community Professional
Correct answer by Kukurykus | Adobe Community Professional
File('~/desktop/FILE.JPG').name.toLowerCase()
TOPICS
Actions and scripting, Download and install, How to, Problem or error, SDK, Windows

Views

93

Likes

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

Adobe script/java script string functions

Community Beginner ,
Oct 14, 2020

Copy link to clipboard

Copied

Hi i need to make a file name string variable to all lowercase letters i tried using the toLowerCase but i get a error saying the function toLowerCase doesnt exists.Do i need to download another library to manipulate strings or is this possible at all?Iam using version 21.2.4 of photoshop

Thanks

Adobe Community Professional
Correct answer by Kukurykus | Adobe Community Professional
File('~/desktop/FILE.JPG').name.toLowerCase()
TOPICS
Actions and scripting, Download and install, How to, Problem or error, SDK, Windows

Views

94

Likes

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
Oct 14, 2020 0
Contributor ,
Oct 15, 2020

Copy link to clipboard

Copied

Works for me in CC 2019.

 

#target photoshop;
var filename = app.activeDocument.name;
var strName = String(filename);
var GetName = strName.toLowerCase();
alert (GetName);

Likes

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
Reply
Loading...
Oct 15, 2020 2
Adobe Community Professional ,
Oct 15, 2020

Copy link to clipboard

Copied

File('~/desktop/FILE.JPG').name.toLowerCase()

Likes

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
Reply
Loading...
Oct 15, 2020 1
bhkz12 LATEST
Community Beginner ,
Oct 15, 2020

Copy link to clipboard

Copied

This is odd yesterday i was using alert(app.activeDocument.name.toLowerCase()) just to see if toLowerCase was supported but i was  getting error 24 saying toLowerCase function doesnt exists now it works that way, and both ways in the posts above.Thanks for the help

Likes

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
Reply
Loading...
Oct 15, 2020 0