continuing execution

(newbie)

hi all,
i’m writing an application that uses an applescript bridge to send commands to quark xpress passport


tell application “QuarkXPress Passport.app”
try
tell document “Progetto2”
– some code
tell page 2
– some code
tell story 1 of text box “theTxtBox”
set contents of (every text whose contents = “description”) to “my description”
set contents of (every text whose contents = “price”) to “0”
delete (every line whose contents contains “discount”)
set contents of (every text whose contents = “kg”) to “270 g”
set contents of (every text whose contents = “notes”) to “my note”
end tell
end tell
end tell
on error

– CONTINUE ???

end try
end tell

The problem here is that if an error occurs (i.e. if “theTxtBox” does not contain any “kg” label) the execution is stopped and other labels are not inserted (“notes” are skipped).
It should go on instead and insert lines that follow the one that sent the exception.

how could I do this?

Any help would be GREATLY appreciated.

thx in advance.

I’m not sure I understand. If you want the “notes” line to execute whether or not the “kg” line executes, then error-trap it seperately:


try
    set contents of (every text whose contents = "kg") to "270 g"
end try
set contents of (every text whose contents = "notes") to "my note"