• 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: old script fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: old script fails


  • Subject: Re: old script fails
  • From: Deivy Petrescu <email@hidden>
  • Date: Sat, 26 Jul 2014 15:07:15 -0400

On Jul 26, 2014, at 13:54 , Robert Poland <email@hidden> wrote:

> Hi,
>
> I have been using this script for ages, now it fails. Maybe Mavericks killed it. I know it’s crude but it worked.
>
> Ideas?
>
> 	tell application "System Events" to set processlist to name of every process
> 	if processlist does not contain "GraphicConverter" then
> 		repeat while processlist does not contain "GraphicConverter"
> 			tell application "System Events" to set processlist to name of every process
> 			tell application "GraphicConverter 9"
> 				activate
> 			end tell
> 			delay 0.2
> 		end repeat
> 	end if
>
> TIA,
>
> Robert Poland
> Fort Collins CO
>
wouldn’t it be more succinct if you wrote it like this:

tell application "System Events" to set processlist to exists process "GraphicConverter 9"
if not processlist then tell application "GraphicConverter 9" to activate

?

Don’t forget that activate works with all apps, scriptable or not!


Deivy Petrescu
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


  • Follow-Ups:
    • Re: old script fails
      • From: Robert Poland <email@hidden>
References: 
 >old script fails (From: Robert Poland <email@hidden>)

  • Prev by Date: old script fails
  • Next by Date: Re: old script fails
  • Previous by thread: old script fails
  • Next by thread: Re: old script fails
  • Index(es):
    • Date
    • Thread