Annoying ASCII boxes

I have a script that takes text out of Quark and puts it into a field in FMP. When there is a soft return in the Quark text it turns up as an annoying little box in the FMP record. If I manually copy and paste from Quark to FMP no boxes don’t show. Does anyone now what can be done to fix this. Where is it coming from Quark, AppleScript or FMP?
Simon

: I have a script that takes text out of Quark and puts it into a
: field in FMP. When there is a soft return in the Quark text it
: turns up as an annoying little box in the FMP record. If I
: manually copy and paste from Quark to FMP no boxes don’t show.
: Does anyone now what can be done to fix this. Where is it
: coming from Quark, AppleScript or FMP?
For lack of a better idea…
You could create a one line FMP script:
Set field [“Quark text”, Substitute (“Quark text”, “Annoying ASCII character”, “What to replace it with”)]
And then have your AppleScript use FMP’s “do script” command to execute the above script right after your import. That would clean the text (in a somewhat roundabout fashion!).
HTH,
Bill

: Does anyone now what can be done to fix this. Where is it
: coming from Quark, AppleScript or FMP?
It’s a soft return (shift-return) in the Quark Doc.
I don’t deal with FMP, so I don’t know if Bill’s answer is faster, but the following might help you as well.

tell application "QuarkXPress™ 4.11"
    tell document 1
        set theText to story 1 of text box 1 --get text w/ soft return
        set theText to removeSoftReturns(theText) of me
        set story 1 of text box 2 to theText -- same text, but w/ space instead of return
    end tell
end tell
to removeSoftReturns(theText)
    set theChar to ASCII character 7 -- soft return
    if theText contains the theChar then
        set {oldTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, {theChar}}
        set theText to text items of theText -- NB: text items, not items
        set AppleScript's text item delimiters to " "
        set theText to theText as text -- Soft returns are now spaces
        set AppleScript's text item delimiters to oldTID
    end if
    return theText
end removeSoftReturns

–tet