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

open image at location

New Here ,
May 02, 2011 May 02, 2011

please give me the solution

how to open file from one location in script

TOPICS
Actions and scripting
720
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 , May 03, 2011 May 03, 2011

c.pfaffenbichler wrote:

Maybe

app.open(File(/*insert the correct path as a string here*/))

Use / not \  in the path for example   "~/My Documents/My Pictures/IMG_5597.CR2"

You can also prompt for a file

var dir =  Folder("~/My Documents/My Pictures"); // Root Folder for Images

//Prompt for background

NewImage = dir.openDlg("Select an  Image" , "Select:*.nef;*.cr2;*.crw;*.dcs;*.raf;*.arw;*.orf;*.dng;*.psd;*.tif;*.jpg;*.png;*.bmp");

if( NewImage != undefined){

     open(File(NewImage))

     code

     }

Translate
Adobe
Community Expert ,
May 03, 2011 May 03, 2011

Maybe

app.open(File(/*insert the correct path as a string here*/))

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 ,
May 03, 2011 May 03, 2011

c.pfaffenbichler wrote:

Maybe

app.open(File(/*insert the correct path as a string here*/))

Use / not \  in the path for example   "~/My Documents/My Pictures/IMG_5597.CR2"

You can also prompt for a file

var dir =  Folder("~/My Documents/My Pictures"); // Root Folder for Images

//Prompt for background

NewImage = dir.openDlg("Select an  Image" , "Select:*.nef;*.cr2;*.crw;*.dcs;*.raf;*.arw;*.orf;*.dng;*.psd;*.tif;*.jpg;*.png;*.bmp");

if( NewImage != undefined){

     open(File(NewImage))

     code

     }

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
Guide ,
May 03, 2011 May 03, 2011

JJ, thats a commented out string… and not any path notation…

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 ,
May 03, 2011 May 03, 2011
LATEST

Yes that is a comment  /* coment */

I was making a note the when you replace that comment the user should use a forward slash in path not backward slash that is all.

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