• 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: Christopher Stone <email@hidden>
  • Date: Mon, 06 Feb 2012 21:46:46 -0600

On Feb 06, 2012, at 19:59, Shane Stanley wrote:
What you're showing there is normal AS behavior. You can't use a variable for the application name in a "tell application" construct unless you wrap it in a "using terms from..." block.
______________________________________________________________________

Hey Shane,

Aha!  Thanks.

I thought you could use the bundle id as a synonym for the app.  Apparently I didn't try the verbatim id when I was testing earlier.

This compiles and works just fine.

--
Best Regards,
Chris

______________________________________________________________________


set sampleText to ""
repeat 10 times
set sampleText to sampleText & "This is a test!" & return
end repeat
tell application "Finder"
set bbeditBundleID to bundle identifier of processes whose has scripting terminology is true ¬
and name contains "BBEdit"
end tell

tell application id "com.barebones.bbedit"
activate
set newDoc to make new document
tell text of newDoc
set after last character to sampleText
select insertion point after last character
end tell
set text of selection of front text window to "•" & return
select insertion point after selection


tell front text document
its properties
end tell
end tell

 _______________________________________________
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>
References: 
 >Re: Issue with process names (Christopher Stone) (From: David Crowe <email@hidden>)
 >Re: Issue with process names (Christopher Stone) (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Issue with process names (Christopher Stone)
  • Next by Date: Re: Issue with process names (Christopher Stone)
  • Previous by thread: Re: Issue with process names (Christopher Stone)
  • Next by thread: Re: Issue with process names (Christopher Stone)
  • Index(es):
    • Date
    • Thread