I have the following Gesture Launch script that puts quotes "" around
selected text and I would like to change it into a script that will put
brackets () around the text.
I mailed Ron Risley a while back and never got an answer and his website
seems to be gone, since I don't really have a clue about scripting, is there
maybe anybody else on the list that could help me out ?
Robert Benschop
The script:
//
// Quote It
//
// Places double quote marks around the selected text.
//
// Copyright © 1997 Ron Risley <rrisley@pobox.com>
// http://www.pobox.com/~rrisley/
local itemText := nil;
local offsets := getHiliteOffsets();
local kQuote := "\u0022";
if offsets then begin
// get the text of the selected item
local offsetArray := offsets[0];
if offsetArray[0].text
then itemText :=
SubStr(offsetArray[0].text,offsetArray[1],offsetArray[2]-offsetArray[1]);
else if offsetArray[0].realData.text then itemText :=
SubStr(offsetArray[0].realData.text,offsetArray[1],offsetArray[2]-offsetArra
y[1]);
// add the quotes
itemText := kQuote & itemText & kQuote;
// replace it
local frontView := GetView('viewFrontKey);
if frontView then postKeyString(frontView, itemText);
end;
******************************************
This NewtonTalk Message brought to you by:
EVOTE.COM, the ESPN of Politics on the
Internet. Visit EVOTE.COM for all the latest
news on Campaign 2000!
Visit http://www.evote.com today!
******************************************
Need Subscribe/Unsubscribe Info?
visit http://www.planetnewton.com
******************************************
This archive was generated by hypermail 2b29 : Wed May 03 2000 - 09:41:19 EDT