Gert Menke wrote:
> hi,
>
> > I wanted this thing since a long time: A DB script to speak the
> > highlighted text:
> > local t := GetHilitedTextItems();
> > foreach item in t do
> > PlaySound(item);
> THat's great, thanx;
> but when I do this and have no text selected, I get an error.
> I would rather like the script simply to do nothing in that case.
> How can I do that?
I wish I could help, but I can't find any reference to this
"GetHilitedTextItems" function in the Newton Programming Reference.
I would make a guess that this function probably returns an array. So,
here is how I would do it::
local t := GetHilitedTextItems();
if Length(t) > 0 then
foreach item in t do
PlaySound(item);
I've tried running that code and, sure enough, I'm getting an exception
because the OS doesn't recognize the GetHilitedTextItems function. Are
you sure that there isn't a typo???
-Laurent.
=====================================================================
Laurent Daudelin
Developer, Adaptive Infrastructure, CIS Fannie Mae
Phone: 703-833-4266 mailto:Laurent_Daudelin@fanniemae.com
********** Usual disclaimers apply **********
******************************************
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:18 EDT