Skip to main content
Participating Frequently
March 22, 2018
Question

How do I finish this script to open the images in photoshop?

  • March 22, 2018
  • 2 replies
  • 3435 views

I'm a complete noob.

How do I open these images in photoshop?

     #target bridge;

     var files = Folder("/Users/chris.carey/Desktop/Get Some/").getFiles("*IMG*");

Thanks,

Chris

This topic has been closed for replies.

2 replies

Participating Frequently
August 3, 2023

This is my windows photoshop scripts, but it's not working on mac sx photo selection path

 

// Open the Edges Collections directory

var strEdgeFXFolder = Folder.selectDialog ("~/Desktop/My Logo 1");

var edgeFXFile = strEdgeFXFolder .openDlg("Choose the egde you want to apply","JPEG/PNG:*JPG;*.JPEG;*.JPE;*.PNG;*.psd;*.PSD");

open (edgeFXFile)

 

help

Kukurykus
Legend
March 22, 2018

#target bridge

BT = '(function BT(v1, v2) {bt = new BridgeTalk(), bt.target = v1, \

bt.body = v2, bt.onResult = function(v) {return res = v.body} bt.send(2)})'

eval(BT + "('photoshop', 'File(decodeURI(Folder.startup)).fsName')")

for(fls = Folder('~/Desktop/Get Some').getFiles(/img/i), i = 0; i < fls.length; i++) {

     if (fls instanceof File) new Thumbnail(fls).openWith(res + '/photoshop.exe')

}

Ps. after you copy this code remove white spaces from end of 3rd line, as this poor editor produces some extra ones.

Participating Frequently
March 23, 2018

Hey Kukurykus!

Thanks for you reply, really appreciate the help!

I've placed my original code on top of your code and it hasn't worked, is that what I was meant to do?

I'm also using a mac will that be a problem?

This is what it looks like at the moment.

Thanks,

Chris

Kukurykus
Legend
March 23, 2018

Your code got rewritten, so just use sole script of me I posted. I shortened path you used to: Folder('~/Desktop/Get Some')

I'm seeing there's lack of closing bracket in your error. You may tell me also what kind of error it is. Maybe there is other bug.