NISUS Archives

April 2011

NISUS@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Þorvarður Davíðsson <[log in to unmask]>
Reply To:
Date:
Mon, 4 Apr 2011 01:27:11 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
Hello,

I make a search in a macro and need to know whether something was found or not. How can I do that?

This tells me whether some text is selected in the document

$textExpression = Read Selection
if $textExpression == ''
	prompt "You need to select some text."
	exit
End 


It works fine, so why does *this* not work?

$textFound = Read Selection
if $textFound == ''
	prompt "Nothing found."
	exit
End 


I have also tried 

if $textFound >1
or
if $textFound >0


but that does not make any difference.



Žorvaršur

ATOM RSS1 RSS2