Skip to main content
Participating Frequently
Mar 22, 2018 3:41 PM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

22 replies

Participating Frequently
Aug 3, 2023 3:12 AM UTC

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

Translate
Kukurykus
Legend
Mar 22, 2018 5:42 PM UTC

#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.

Translate
Participating Frequently
Mar 23, 2018 11:36 AM UTC

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

Translate
Kukurykus
Legend
Mar 23, 2018 11:43 AM UTC

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.

Translate