Re: The Challenge (was whole(string) is in a fld)

2007-07-03 Thread FlexibleLearning
Hi Dave > PS I think I just mailed again from the wrong address again. Expect > to see the same reply in a month or so. :-0 It is so nice to know that I am not the only one subject to "Senior moments". :-)) /H Hugh Senior ___ metacard ma

Re: The Challenge (was whole(string) is in a fld)

2007-07-02 Thread Dave Cragg
Hi Hugh I think I wrote those mails a long time ago from the wrong address and they've just been allowed through now. Sorry if they prompted you to respond. Cheers Dave PS I think I just mailed again from the wrong address again. Expect to see the same reply in a month or so. :-0 Hi

Re: The Challenge (was whole(string) is in a fld)

2007-07-02 Thread Dave Cragg
Hi Hugh I think I wrote those mails a long time ago from the wrong address and they've just been allowed through now. Sorry if they prompted you to respond. Cheers Dave Hi Dave, Case sensitivity is an optional extra (although international should, if possible, be handled for those wh

Re: The Challenge (was whole(string) is in a fld)

2007-07-02 Thread FlexibleLearning
hole("This is a test",sourceText) => FALSE whole("This is a test-piece",sourceText) => TRUE /H >Hi Hugh > >Usual technique to seek extra time from a client is to ask more >questions. :-) > >I assume the string has to match on the

Re: The Challenge (was whole(string) is in a fld)

2007-07-02 Thread Dave Cragg
Hi Hugh Usual technique to seek extra time from a client is to ask more questions. :-) I assume the string has to match on the start of a word boundary. e.g. put "This is a test." into sourceText (note the punctuation) whole("is is a test",sourceText) => FALSE

Re: whole(string) is in a fld

2007-07-02 Thread Dave Cragg
Sorry. Ignore my first try. It fails already. (-: Dave ___ metacard mailing list metacard@lists.runrev.com http://lists.runrev.com/mailman/listinfo/metacard

The Challenge (was whole(string) is in a fld)

2007-06-13 Thread FlexibleLearning
The Challenge: "Write a function that returns TRUE or FALSE for the existence of any valid text string existing within any longer text string. (To make things easier we limit this to ASCII text; right-to-left double-bite Unicode character reco gnition can come later :-)" e.g. put

Re: whole(string) is in a fld

2007-06-12 Thread Ken Ray
On Tue, 12 Jun 2007 14:26:12 EDT, [EMAIL PROTECTED] wrote: > I've returned to this little conundrum many times over the years but have > yet to solve it. > > Any offers? How about: put wholeWordMatch("This is a test",long id of fld 1) function wholeWordMatch pFindText,pFldRef find w

Re: whole(string) is in a fld

2007-06-12 Thread Dave Cragg
This doesn't check that the matched target starts on a word boundary, But a simple check on char (tOff -1) or whether tOff is at the beginning of the target shoud do it. On 12 Jun 2007, at 20:32, Dave Cragg wrote: Please ignore my first attempt. It fails horribly. (-: Here's another. Any

Re: whole(string) is in a fld

2007-06-12 Thread Dave Cragg
Please ignore my first attempt. It fails horribly. (-: Here's another. Any better? function whole s,t put length(s) into tNumChars put ",.;:?!" & space & tab & cr & numToChar(13) into tWB put offset(s,t) into tOff if tOff = 0 then return false return length(t) = (tOff + tNumChars - 1)

Re: whole(string) is in a fld

2007-06-12 Thread PEChumbley
How about something like this: put "This is a test." into myLine replace " " with "*" in myLine put fld 1 into myField replace ". " with ".#" in myField (note : period + space. use two spaces if needed) replace space with "*" in myField replace "#" with space in myField if myLin

Re: whole(string) is in a fld

2007-06-12 Thread Dave Cragg
Hi Hugh First try. But like from our clients, we need clearer specs. ;-) What are the punctuation rules? This assumes only final punctuation in the target should be ignored. It will try to match punctuation where it exists in the source. It will fail if there is double punctuation in the

whole(string) is in a fld

2007-06-12 Thread FlexibleLearning
I am trying to write a function that returns whether a given phrase exists in a field as whole words. e.g. put "This is a test." into fld 1 (note the punctuation) whole("This is a tes",fld 1) = FALSE whole("This is a test",fld 1) = TRUE. A bit like trying to get the line "This is a tes" i

Re: replace a string with tab

2006-01-08 Thread FlexibleLearning
> I want to replace three spaces with a tab stop.   You mean something like...   set the defaultStack to "Karten" repeat with n=1 to num of marked cds   replace SPACE&SPACE&SPACE with TAB in fld "Antwort" of marked cd n end repeat   HTH   /H ___ meta

replace a string with tab

2006-01-08 Thread Reinhold Venzl-Schubert
Hi!Before I learned that I can arrange text in a field with tab stops I used a lot of spaces.Now I want to replace three spaces with a tab stop. Here is my script:on mouseUp  global old  global new  put fld "Alt" into old  put fld "Neu" into new    go stack "Karten"  go next marked cd  go fld "Antw

Re: function to calculate string length...

2005-01-03 Thread Chipp Walters
Wouter, Thanks. Got it. Different strategy, but nice:-) Wouter wrote: Chipp, sorry for the delayed response due to festivities. My other handler is using the difference in number of lines of a field and the number of lines of the formattedtext of the same field if the text is "wrapped". And it is

Re: function to calculate string length...

2005-01-03 Thread Wouter
On 29 Dec 2004, at 18:00, [EMAIL PROTECTED] wrote: Message: 1 Date: Tue, 28 Dec 2004 20:08:02 -0800 From: Chipp Walters <[EMAIL PROTECTED]> Subject: Re: function to calculate string length... To: Discussions on Metacard Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charse

Re: function to calculate string length...

2004-12-28 Thread Chipp Walters
Thanks for this, would you mind explaining what it does? Thanks again Chipp Wouter wrote: Re: function to calculate string length... Chipp Walters Sun, 26 Dec 2004 04:21:44 -0800 Well, I cobbled this together from some of the archives... Anyone see an obvious place to optimize? on formatFld

Re: function to calculate string length...

2004-12-27 Thread Wouter
Re: function to calculate string length... Chipp Walters Sun, 26 Dec 2004 04:21:44 -0800 Well, I cobbled this together from some of the archives... Anyone see an obvious place to optimize? on formatFld pFldName, pTxt lock screen put the width of fld pFldName into tW set the width of fld

Re: String comparison

2004-06-30 Thread Simon Lord
Got it. answer replaceText(fullPATH, sessionPATH, "") On Jun 30, 2004, at 11:09 AM, Simon Lord wrote: I have two strings, file paths actually. Both path names are the same for the first ~5 directories, then the rest is what I'm actually interested in. My questions is, how can I

String comparison

2004-06-30 Thread Simon Lord
I have two strings, file paths actually. Both path names are the same for the first ~5 directories, then the rest is what I'm actually interested in. My questions is, how can I compare string "A" to string "B" and get the diff

Re: & String

2002-05-17 Thread Scott Rossi
>> How do you assemble a string that contains ampersands in it? > Put 'em in quotes: > > put name1&"="&value1&"&"&name2&"="&value2 > > Is that what you were looking for? Yes -- thank you. Big "duh&qu

Re: & String

2002-05-17 Thread Yennie
Put 'em in quotes: put name1&"="&value1&"&"&name2&"="&value2 Is that what you were looking for? You could also define your own constant... Regards, Brian << OK, I g

& String

2002-05-17 Thread Scott Rossi
OK, I give up. How do you assemble a string that contains ampersands in it? Regards, Scott Rossi Creative Director Tactile Media, Multimedia & Design - E: [EMAIL PROTECTED] W: http://www.tactilemedia.com ___ metacard mailing list [E

Re: Find string Anamolies

2001-04-10 Thread Sivakatirswami
>> find string "married" >> >> hit return: first instance of "married" is found and hilited. >> arrow up to the same command in the message box. hit return again: >> >> Now, this is the "weird" part and the one that is causing ha

Re: Find string Anamolies

2001-04-10 Thread Sjoerd Op 't Land
Sivakatirswami wrote/ schreef: > open message box and enter: > > find string "married" > > hit return: first instance of "married" is found and hilited. > arrow up to the same command in the message box. hit return again: > > Now, this is the &q

Find string Anamolies

2001-04-09 Thread Sivakatirswami
OK as I pursue the solution to an eBook search function we find this anamoly: This is a small 70 page/card book. One field per card. There are about 15 instances of the word "married" in the whole book spread out over as many cards. open message box and enter: find string "marri

Re: Find Function: String? Whole?

2001-01-30 Thread Sivakatirswami
SKTS said. . . .netetiquettely tersely: "couldn't get FIND to work on a multi line string" . . .and Andu said, with even more awesome brevity: > couldn't resist: > on mouseUp > local t1,t2 > set the itemdel to "ƒ" > repeat for each item x in fld

Re: Find Function: String? Whole?

2001-01-29 Thread andu
t. Problem is I can't get the >script to find the data in the field. I have used "Whole" and "String" to no >avail. I know the address is there. . .because I can see it in the message >box. . .the value of x, but why can't MC find x in the field? This works in

Re: Find Function: String? Whole?

2001-01-29 Thread andu
Couldn't resist... on mouseUp local t1,t2 set the itemdel to "ƒ" repeat for each item x in fld "tTextField" if the number of lines of x = 4 then put x -- OK we know we got one. . .it shows in the message box if matchChunk (fld "tTextField", "(." & x & "*)",t1, t2) then put t1

Find Function: String? Whole?

2001-01-29 Thread Sivakatirswami
t get the script to find the data in the field. I have used "Whole" and "String" to no avail. I know the address is there. . .because I can see it in the message box. . .the value of x, but why can't MC find x in the field? This works in Supercard. . .I am missing something.