• 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: Robert Poland <email@hidden>
  • Date: Sat, 26 Jul 2014 13:57:03 -0600

Thanks Deivy,

I feel that the repeat is necessary because in the app may not start before the next commands.

Using your suggestion, this works:

tell application "System Events" to set processlist to exists process "GraphicConverter 9"
if not processlist then
	repeat while not processlist
		tell application "System Events" to set processlist to exists process "GraphicConverter 9"
		tell application "GraphicConverter 9" to activate
		delay 0.2
	end repeat # not processlist
end if # not processlist


On Jul 26, 2014, at 1:07:PM, Deivy Petrescu <email@hidden> wrote:

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

Robert 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: 
 >old script fails (From: Robert Poland <email@hidden>)
 >Re: old script fails (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: old script fails
  • Next by Date: Re: How to convert a macro to Applescript ?
  • Previous by thread: Re: old script fails
  • Next by thread: Re: How to convert a macro to Applescript ?
  • Index(es):
    • Date
    • Thread