• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AS timeout as result of print event
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AS timeout as result of print event


  • Subject: Re: AS timeout as result of print event
  • From: JJ <email@hidden>
  • Date: Sun, 23 Jun 2002 12:58:34 +0200

> I wonder if anyone can help me handle a timeout with a print event?
>
> The code I'm using is fine for most documents, but I sometimes get an apple
> event timeout

An apple event timeout is a common problem when printing via applescript, or
when executing long operations within apps, because it sends an apple event
and waits for the application response. I think that applescript waits
exactly a minute, then throws a timeout error.

AS: <please, print this>
Word: <it's done!>
AS: <cool, now close the doc...>

or

AS: <please, print this>
Word:...
-- a minute later...
AS: <what's up with this guy?>
-- apple event time out

You can manipulate the time applescript waits for a response using a
"timeout" statement in the conflictive line (I can't see your "bold type",
but it must be the "print" command...)

> Here's the block where it happens...
>
> tell application "Microsoft Word"
> activate
> repeat with i from 1 to (count Wfilelist)
> set testfile to (item i of Wfilelist as alias)
> open testfile --open the testfile

with timeout of 3600 seconds
-- 1 hour to print a very long doc.

> do Visual Basic " ActiveDocument.PrintOut" --print the testfile
> without dialog

end timeout

> close windows saving no
> end repeat
> quit saving no
> end tell

JJ
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: [OFF] Re: BUG: More on C-header text files - CORRECTION
  • Next by Date: Re: Using AppleScript Guidebook in OS X?
  • Previous by thread: AS timeout as result of print event
  • Next by thread: Fun with Eudora & AppleScript
  • Index(es):
    • Date
    • Thread