• 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: Applescript hanging after sleep? Partly?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applescript hanging after sleep? Partly?


  • Subject: Re: Applescript hanging after sleep? Partly?
  • From: Brian Johnson <email@hidden>
  • Date: Sat, 29 Sep 2007 20:37:27 -0700 (PDT)


Hi Mike,

I have several scripts that run periodically over the course of hours and days. The ScreenSaver doesn't seem to present them with a problem, but I have found that I get an (un-interceptable) "invalid connection" error from the script that talks to GraphicConverter if I don't quit and restart GraphicConverter about once a day. I've never been entirely satisfied as to why this happens, but it seems like the OS, the script, or the app may be using the date for something internal that breaks when enough time has elapsed. Using cron to stop and restart GraphiConverter once or twice a day works for me. Doing the same things for iRed might help, though it doesn't explain why VNC has the effect you're seeing, or why it's necessary in the first place (sigh).

Good luck.

  -b.johnson (another seattleite)

On Sat, 29 Sep 2007, Michael Casteel wrote:

I have a small app using Applescript to command an IR transmitter on
my Mac Mini. The commands are triggered through a Ruby on Rails app
running on the Mini. All works fine, until the next day...when the
Applescript execution (via osascript) hangs instead of performing the
function...UNTIL I connect in to Remote Access using VNC, at which
time the script runs. I don't do anything, just connect in, and the
script commences to run to completion.

The Mini is set to sleep for a few hours each night, and at the time I
connect in I normally notice that the display is in screen saver mode;
connecting in seems to stop the screen saver.

Could the screen saver be stopping Applescripts from running?

Not completely, since the Ruby app also controls iTunes, via RubyOSA.
The iTunes functions are triggered before the IR transmitter
functions, and they appear to complete OK, the app hangs when it gets
to osascript trying to command the IR transmitter app (iRed).

I also made a little Ruby app that uses RubyOSA to command iRed. This
morning I went in via ssh and launched the Ruby app, but it never
completed the initial RubyOSA function call:

ired = OSA.app('iRed')

UNTIL I connected in via VNC. As soon as I did that, the Ruby app
executed to completion, issuing multiple commands to iRed.

How could this be?

Note: Commands to iTunes (which appear to work fine) are using the
RubyOSA object it = OSA.app('iTunes'), which was obtained when my
Rails server was started the day(s) before, but I don't know if this
has anything to do with the problem.
--
Mike Casteel                                        Seattle, WA
_______________________________________________
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

_______________________________________________
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
References: 
 >Applescript hanging after sleep? Partly? (From: "Michael Casteel" <email@hidden>)

  • Prev by Date: Bad Characters from Unicode
  • Next by Date: Re: Applescript hanging after sleep? Partly?
  • Previous by thread: Applescript hanging after sleep? Partly?
  • Next by thread: Re: Applescript hanging after sleep? Partly?
  • Index(es):
    • Date
    • Thread