• 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: Script fails with Leopard.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script fails with Leopard.


  • Subject: Re: Script fails with Leopard.
  • From: Robert Poland <email@hidden>
  • Date: Wed, 21 Nov 2007 17:34:01 -0700

Thanks Skeeve and Yvan,

I tried this script and got the error. "System Events got an error: Connection is invalid."

With "Alarm Clock Pro" running the script does as expected.

Errors when run from Smile and when called from Cron.

OS 10.5.1.

On Nov 21, 2007, at 9:37 AM, Skeeve wrote:

Robert Poland wrote:
Wizards,

This script has worked for years. Now with Leopard it fails.

tell application "Finder"
if not ((some process whose name contains "Alarm Clock Pro") exists) then -- this line says connection is invalid
tell application "Alarm Clock Pro" to activate
delay 1
tell application "System Events" to set visible of process "Alarm Clock Pro" to false
end if
end tell


Any ideas?
"process" is (even in Tiger) in the "System Events".
Try:

tell application "System Events"
if not ((some process whose name contains "Alarm Clock Pro") exists) then -- this line says connection is invalid
tell application "Alarm Clock Pro" to activate
delay 1
set visible of process "Alarm Clock Pro" to false
end if
end tell

Bob Poland - Fort Collins, CO



_______________________________________________
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: 
 >Script fails with Leopard. (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Bundle Objects
  • Next by Date: Re: simple problem?
  • Previous by thread: Re: Script fails with Leopard.
  • Next by thread: Getting unexpected results from sed inside AppleScript
  • Index(es):
    • Date
    • Thread