Applescript to Insert Two Lines On Text Into IPTC Special Insructions

Hi All

We are trying to create an Applescript that will insert two lines of text into the IPTC Instruction field in Photoshop CS5. We have managed to get the text in the right place but the second insertion blows away the first.

We want to end up with…
1st line of text
2nd line of text

…rather than…
1st line of text 2nd line of text

This is what we have so far…

on main(inputs, outputFolder, params)
repeat with input in inputs
tell application “Adobe Photoshop CS5.1”
– open an input file
set theImage to input
open file theImage
tell current document
tell info
set instructions to “1st line of text”
set instruction to “second line of text line”
end tell
end tell
set fileName to name of (info for input)
set output to outputFolder & “/” & fileName
save document 1 in output as JPEG
close document 1 saving no
end tell
end repeat
end main

Any help would be greatly appreciated.

Many thanks

Paul

Ever try to use a single instruction:
set instructions to “1st line of text” & linefeed & “second line of text line”

or
set instructions to “1st line of text” & return & “second line of text line”

Yvan KOENIG running Yosemite 10.10.5 in French (VALLAURIS, France) vendredi 25 septembre 2015 19:07:16