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

Pathing issue with an auto export script.

New Here ,
Apr 02, 2018 Apr 02, 2018

Copy link to clipboard

Copied

Newb here, I'm writing a script for others to increment a layer in photoshop then export the photo before repeating. My thought to make it work on everyones system was to just dump the exported photos into C:, however, that's throwing an error 'target address unknown' whenever I run it. Is it possible to do relative addressing in JS? So wherever the script is located will be where the photos export to. If not I'd still like to throw it into the C: drive, I'm pretty sure the error is in how I formatted the address in line 5. Any tips? Thanks.

Code: https://pastebin.com/iWdh4dSh

TOPICS
Actions and scripting

Views

443

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
Adobe
People's Champ ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

Does the user have rights to write to the root of the disk C:?
Try running photoshop "as administrator".

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
New Here ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

Thanks for the reply, yes PS is run as admin and the account is an admin account with full access.

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
People's Champ ,
Apr 04, 2018 Apr 04, 2018

Copy link to clipboard

Copied

It's strange. At me your script works in CS6 and СС 2018 without errors. Please show the screenshot of the error window. And tell me how you run the script.

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
Contributor ,
Apr 04, 2018 Apr 04, 2018

Copy link to clipboard

Copied

Yes - same opinion as r-bin!

Tested with a sub folder in the path?

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
New Here ,
Apr 06, 2018 Apr 06, 2018

Copy link to clipboard

Copied

Here's the error message: Imgur: The magic of the Internet

I'm running in by going to scripts -> browse -> file.js

This in line 5 works: var saveFile = File('/C/Users/DW/Pictures/channel/' + i + '.png'); works.

var saveFile = File('/C/' + i + '.png') Does not work.

I'm trying to make it work on anyone's computer without having to modify the JS so I was just going to dump it onto the C drive which everyone should have.

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
People's Champ ,
Apr 06, 2018 Apr 06, 2018

Copy link to clipboard

Copied

LATEST

Can you save the file to drive C: manually through the menu File->Save fow Web... ?

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