Chris,

Thanks for the tip. I downloaded the Satimage file, installed it and
modified my script to look like:

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

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.

Scott

On Apr 12, 11:30 am, Christopher Stone <[email protected]>
wrote:
> On Apr 12, 2012, at 07:13, stirrell wrote:> I wrote a simple little 
> Applescript to look up the selected text in CodeIgniter's documentation:
>
> ______________________________________________________________________
>
> Hey Scott,
>
> There are a variety of ways to do this via the shell such as the method 
> LuKreme demonstrated.
>
> Somewhere there is a handler to do it with pure vanilla Applescript (probably 
> available on MacScripter.com).
>
> Personally I'd use the Satimage.osax.  It integrates this and many other 
> useful functions (including regular expressions) directly into the 
> Applescript lexicon.
>
> set u to 
> "https://www.google.com/search?as_sitesearch=codeigniter.com%2Fuser_gu...>model&sa=Go"
> set u to escapeURL u # Satimage.osax
>
> --> "https://www.google.com/search?as_sitesearch=codeigniter.com%252Fuser_...";
>
> --
> Best Regards,
> Chris

-- 
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>

Reply via email to