BridgeTalk in a loop?

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

Mike Hale

BridgeTalk in a loop?

Post by Mike Hale »

I think I am getting crossed-eyed over tying to make this work. The original files from the client are unnamed and all on one layer. I wrote a jsx file to rename the paths and I split the simple and compound path by hand. I forgot to rename the paths in your sample and it seem mus-labeled the layers.

If I have to I can send the client your AppleScript and tell him he will have to make the assets files himself. Who knows maybe that will send some work your way.

But I still would like to have a working jsx version. If you find that InDesign BridgeTalkIterator example from Bob I would be even more grateful it you posted it here.

I also tried using a file to transfer the name and photoshop.executeSript but that didn't work either. It seems to me that Photoshop can't process a javascript while a javascript is running in Illustrator. They just queue up until the script is done. Does anyone know if Photoshop and Illustrator share the same javascript engine?

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

larsen67

BridgeTalk in a loop?

Post by larsen67 »

Mike, here is my more up to date AppleScript… This would still work with/without naming the path items… Layers can be either order as it gets them by your example file names… I will look for that other stuff too…

tell application "Adobe Illustrator"
activate
tell the current document
set selection to ""
set n to 1
set pCount to count of path items of layer "simple"
repeat with i from pCount to 1 by -1
set pn to name of path item i of layer "simple"
if pn = "" then
set pn to "AI Path " & n
set n to n + 1
end if
set selection to path item i of layer "simple"
copy
set selection to ""
my psRemote(pn)
activate
end repeat
set n to 1
set cpCount to count of compound path items of layer "compound"
repeat with i from cpCount to 1 by -1
set cpn to name of compound path item i of layer "compound"
if cpn = "" then
set cpn to "AI Comp " & n
set n to n + 1
end if
set selection to compound path item i of layer "compound"
copy
set selection to ""
my psRemote(cpn)
activate
end repeat
end tell
end tell
--
on psRemote(pn)
tell application "Adobe Photoshop CS5"
activate
tell the current document
paste
set name of last path item to pn
deselect path item pn
end tell
end tell
end psRemote
Mike Hale

BridgeTalk in a loop?

Post by Mike Hale »

I gave up on trying to get an Illustrator javascript to send BridgeTalk messages in a loop. Instead I changed the target app to ESTK and had it send messages to both Illustrator and Photoshop. That works for the most part, enough that I can code around the remaining problem. That is the first message to Photoshop never returns and times out no matter how long I set the timeout. All the following messages to Photoshop do return.