AppleEvent.Send Performance

Hi Everyone,

I have a simple one page PDF as a test document that I’m trying to print using AppleEvents. It does print, however it takes 25-30 seconds for AppleEvent.Send to finish whatever its doing.

The code looks like this

dim ae as AppleEvent
ae = New AppleEvent("aevt", "pdoc", "")
ae.FolderItemParam("----") = File //A simple 1 page PDF
if not ae.Send() then
    MsgBox("Printing failed!")
end if

Anyone know why this takes so long?

FYI - OSX 10.9.1, Xojo 2013r4.1



if you have a desktop icon for a printer set up drag the pdf on to that
Its not fast either


Actually, the printing begins within a few seconds if I do it that way (rather than 25-30 from my application). Any other suggestions?



Maybe don’t have the apple event wait on a reply ?

Thanks Norman, I assume you meant setting a the timeout property on the AppleEvent instance. As long as I don’t care that the event was received or not, this seems to work ok.