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

Need script for photoshop to open a file jpg

Enthusiast ,
Jun 24, 2020 Jun 24, 2020

hi

i need a script for photoshop to open a jpg file

for example K:\grain\dc.jpg

could you help me please?

thanks

TOPICS
Actions and scripting , Windows
570
Translate
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

Community Expert , Jun 24, 2020 Jun 24, 2020

Try the following

app.open(new File("K:\\grain\\dc.jpg"))

 

-Manan

Translate
Adobe
Community Expert ,
Jun 24, 2020 Jun 24, 2020

Try the following

app.open(new File("K:\\grain\\dc.jpg"))

 

-Manan

Translate
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
Enthusiast ,
Jun 25, 2020 Jun 25, 2020

hi

it works!

does it work with old photoshop version too  like cs 6 cs5 ?

thanks

Translate
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
Community Expert ,
Jun 25, 2020 Jun 25, 2020
LATEST

Opening a file is not a new feature it should work as far back as PS version 7 when the scripting support plug-in was an optional download.  Before that Adobe plug-in Photoshop could not be scripted. So the answer is no will not work in Photoshop versions 0 throught version 6 there was no scripting feature in them..

JJMack
Translate
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
Community Expert ,
Jun 25, 2020 Jun 25, 2020

Should work, its pretty basic statement. I don't have these versions installed so can't test it, you can try and if it does not work come back with error details

 

-Manan

Translate
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