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.
______________________________________________________________________This compiles and works just fine.
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