How to call an apps in-built alert

Hi all!
Just wondering if it’s possible to call up an applications alert box from a script.
I do a lot of QuarkXPress scripting and very often have to create my own alert dialogs when I know that XPress has it’s own. I’d like to do something like -

tell app "QuarkXPress"
try
-- Move a box
on error
-- User tried to move box off the pasteboard
-- Call up the correct XPress alert [error 38]
end
end

At the moment I’m having to bring up my own dialogs instead of using the in-built ones. It’s not the end of the world, I’m just curious to know if scripts can interact with apps at this level.
Many thanks,
Juerg

I would think that all you need do is remove the “try - on error”, which should then - unless your script does something to prevent it - allow the app to do its own thing.

Hi Andreas!
I tried what you suggested but it didn’t work. The script itself generates the error, not the targeted application (in this case QuarkXPress).
Here’s a small script to demonstrate what’s happening…

tell application "QuarkXPress™ 4.11"
tell document 1
tell page 1
tell picture box 1
set rotation to 20
end tell
end tell
end tell
end tell

If the picture box is in a position where setting its rotation to 20 degrees would move part of it off the pasteboard, XPress will generate an error [38]. This script generates it’s own error, when saved as an Applet. Once this error has been displayed, the script stops.

You see, what I’d LIKE to do, is have a script which generates the usual XPress errors, so that the user sees the familiar XPress alerts and dialogs at all times. The only unique interface will be the front-end one which will capture any user defined values. Of course, I could create indentical alerts to XPress and just run those, but I figured it would be easier just to call the internal error alerts.
Any other ideas?
Cheers,
Juerg

Juerg - I had misunderstood. Now that I see exactly what you want I’m sorry, but I have no idea. I suspect that if AS makes the call that produces the error you may be stuck with having AS be the first (and only?) to report the error. If you are lucky someone brighter than me will now give you a more useful answer.
Andreas

Andreas,
No worries. I think I’m asking the impossible anyway - at least without an OSAX.
It was just an idle thought I had the other day…
Thanks anyway! :slight_smile:
Cheers,