• 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
Where do the errors go?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Where do the errors go?


  • Subject: Where do the errors go?
  • From: Gil Dawson <email@hidden>
  • Date: Thu, 03 May 2018 17:45:41 -0700

While running a stayopen application produced by Script Editor, such as the one
below, where can I view any execution-time errors or "log" outputs?

--Gil

This works well enough so long as no execution-time errors show up:

on run
        logsome(return & "Starting." & return)
        return
end run

on idle
        logsome("Doing... " & time string of (current date) & return)
        return 20
end idle

on quit
        logsome("Ending." & return)
        continue quit
end quit

on logsome(aString)
        set TestLog to (((path to desktop) as text) & "TestLog.txt") as alias
        try
                close access TestLog
        end try
        open for access TestLog with write permission
        write aString as text to TestLog starting at eof
        close access TestLog
end logsome
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Where do the errors go?
      • From: Gil Dawson <email@hidden>
    • Re: Where do the errors go?
      • From: Axel Luttgens <email@hidden>
    • Re: Where do the errors go?
      • From: Shane Stanley <email@hidden>
References: 
 >Why won't this quit? (From: Gil Dawson <email@hidden>)
 >Re: Why won't this quit? (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Editor performance
  • Next by Date: Re: Where do the errors go?
  • Previous by thread: Re: Why won't this quit?
  • Next by thread: Re: Where do the errors go?
  • Index(es):
    • Date
    • Thread