Typo in clipping text

I’m pretty sure this clipping came from LateNight.

Very hard to spot typo…

using terms from application "[[template:application]]”
	[[selected-lines:-- your code goes here]]
end using terms from

There’s a curly quote after [[template: application]]

While I have your attention I’ve never used using terms from and want to make sure I’m doing it correctly. I’m distributing a script to users who may have not have Excel, Numbers, Text Wrangler or BB Edit installed on their machines, and the script must work with one of them. So I’m doing this:

	using terms from application "TextWrangler"
		tell application "TextWrangler" to set myText to text of window 1
	end using terms from

Will that still compile on a machine that doesn’t have text wrangler installed?

Thanks.

First of all, TextWrangler is discontinued. Use BBEdit.

Typically, the tell statements inside a using terms block use variables – the way you have it kind of defeats the purpose.

You need to check which app is present, put a reference to that in a variable, and then use that.

The sole function of a using terms block is to tell the compiler which dictionary to use for the enclosed code.

Thanks! (Some of the users still have TextWrangler)