• 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: Issue with process names (Christopher Stone)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue with process names (Christopher Stone)


  • Subject: Re: Issue with process names (Christopher Stone)
  • From: David Crowe <email@hidden>
  • Date: Tue, 07 Feb 2012 09:14:02 +0800

Chris, Joe;

Interesting idea to use bundle id.  I found a workaround to avoid the issue, but otherwise probably would have used that solution.

I did a reboot, reconfirmed the problem, and wrote a short script to illustrate the bug (I'm pretty sure it is one).

tell application "Finder"
	set x to name of every process whose name contains "Acrobat" or name contains "FileMaker" --> {"AdobeAcrobat", "FileMaker Pro"}
end tell

try
	tell application (item 1 of x)
		version
	end tell
on error errmsg number errnum
	display dialog errmsg -- "File AdobeAcrobat wasn't found"
end try

try
	tell application (item 2 of x)
		version
	end tell
on error errmsg number errnum
	display dialog errmsg -- "File FileMaker Pro wasn't found"
end try


- David

>
> ------------------------------
>
> Message: 5
> Date: Mon, 06 Feb 2012 09:55:56 -0800
> From: Joe <email@hidden>
> To: Christopher Stone <email@hidden>
> Cc: Applescript Users List <email@hidden>
> Subject: Re: Issue with process names
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Feb 5, 2012, at 8:50 PM, Christopher Stone wrote:
>
>> One possible way around the issue:
>>
>> tell application "Finder"
>> 	set bundleID to bundle identifier of processes whose has scripting terminology is true ¬
>> 		and name contains "BBEdit"
>> end tell
>>
>> using terms from application "BBEdit"
>>
>> 	if bundleID is not {} then
>> 		set bundleID to item 1 of bundleID
>>
>> 		tell application id bundleID
>> 			set newDoc to make new text document
>> 			set text of newDoc to "This is a test!"
>> 		end tell
>>
>> 	else
>> 		# Fail
>> 		return false
>> 	end if
>>
>> end using terms from
>>
>> You've rebooted and tested again to confirm your results?
>>
>> Please take the time to file a bug if you haven't already done so.
>>
>> I haven't monkeyed with tell application id bundle-id for quite some time, and it amazes me that it's necessary to include using terms from to make it compile the app's terminology.  I would think by now it would be a fully synonymous with tell app "app-name".
>
> Hi Chris,
>
> I played around with this after you posted.
>
> The following seems to work OK without "using terms from"
>
> OS X 10.7.3
>
> tell application "Finder"
> 	set bundleID to bundle identifier of processes whose has scripting terminology is true ¬
> 		and name contains "BBEdit"
> end tell
>
> set mybbedit to item 1 of bundleID
> tell application id mybbedit
> 	activate
> 	make new document
> end tell
>
> Perhaps I'm reading in too much. I looked at Sal's site for the terminology to get the above,
>
> Joe


 _______________________________________________
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: Issue with process names (Christopher Stone)
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Issue with process names
  • Next by Date: Re: Issue with process names (Christopher Stone)
  • Previous by thread: Re: Issue with process names
  • Next by thread: Re: Issue with process names (Christopher Stone)
  • Index(es):
    • Date
    • Thread