Applescript hanging after sleep? Partly?
Applescript hanging after sleep? Partly?
- Subject: Applescript hanging after sleep? Partly?
- From: "Michael Casteel" <email@hidden>
- Date: Sat, 29 Sep 2007 16:31:52 -0700
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