stirrell squawked out on Friday 13-Apr-2012@05:51:22
> set theLocation to escapeURL theLocation # Satimage.osax
> open location theLocation
> end tell
>
> I am doing something wrong because I am getting an error that it
> doesn't understand the <<event SATIAdd%>> message. I am pretty new at
> AppleScript. It is pretty interesting. I'll need to read up on it.
You might need to take out the # Satimage.osax, it was intended as a comment.
If you want to leave it in your AppleScript to remind you, change the # to two
dashes. (though I thought AppleScript understood # now).
Make sure your lines are not wrapping. Here's the code with a -- at the end of
each line.
tell application "BBEdit" --
set theSelection to the selection as string --
set theLocation to "https://www.google.com/search?
as_sitesearch=codeigniter.com%2Fuser_guide%2F&q=" & theSelection &
"&sa=Go" --
set theLocation to escapeURL theLocation # Satimage.osax --
open location theLocation --
end tell --
Also, make sure that the Satimage.osax is installed in the right place and that
you've restarted AppleScript Editor (or BBEdit) since installing it.
Generally speaking, anytime someone adds # and some text to anything at all
having to do with any sort of programming it is indicative that the text is a
comment. The exception is that at the beginning of a line when you are talking
about using the terminal, the # indicates to do a command as the super user.
# mdfind -name flubber
means to first make sure you are the superuser (#) and then type in mdfind
-name flubber
You might even see someone type something like this:
# mdfind -name flubber # Must be root to search /System
The second # indicates a comment.
--
Love is strange and you have to learn to take the crunchy with the
smooth I suppose
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>