*smile* That would be a "Harry met Sally" kind of thing.
Oh dear, my wife would /not/ like hearing that.
No, she's a long ago friend, and we've only recently reconnected thanks
to Facebook.
...not that *I* ever go on, you understand. Uh...it's my wife,
see. She goes on quite a bit and...uh
You are adding 1 to word 2 when there is no space. Tabs are not word
delimiters. I may misunderstand the script though I haven't looked at it in
depth.
Bob
On Jun 27, 2012, at 1:24 AM, Keith Clarke wrote:
> Hi folks,
> I'm working on a simple script to identify and count the unique words dum
On Wednesday, June 27, 2012, Ken Corey wrote:
>
> I'm 47 now, and she *still* calls me 'Corey'.
>
does that make her, "Mrs. Ken"?
:)
--
The Hawkins Law Firm
Richard E. Hawkins, Esq.
(702) 508-8462
hawkinslawf...@gmail.com
3025 S. Maryland Parkway
Suite A
Las Vegas, NV 89109
_
You have probably solved your problem already, but here's what I use for
counting occurrences of strings in containers:
function howmany tg,container
-- how many tg = is in container
-- note that howmany("00","00") returns 3, not 5
-- if you want to allow overlapping matches, use:
When I was 13, I got a crush on a girl who asked me my name when we were
in a noisy room. 'Corey' was all she heard.
Of course, being 13, I think I was 14 by the time I bashfully admitted
that was my surname.
I'm 47 now, and she *still* calls me 'Corey'.
No offense taken.
*grin*
-Ken
On
Yes, good point well made, Craig - thanks.
I've moved to an array structure as suggested by Ken Corey. So, the keys behave
better (and much faster) than my attempts to iterate through and compare poorly
structured lines in two fields.
Best,
Keith..
On 27 Jun 2012, at 13:52, dunb...@aol.com wrot
Whoops, sorry Ken - I was too busy copy & pasting your improvement on my code
to proof-read my thank you email properly!
Your help warranted a 'Mr. Corey' at the very least! :-)
Best,
Keith..
On 27 Jun 2012, at 11:23, Keith Clarke wrote:
> Thanks John & Corey.
___
The original issue, the error thrown by your script, can be traced back to the
fact that:
line tLine of fld "results"
"tLine" is not an integer. A line number has to be so designated, and your
"line" is of the form:
"someWord" & tab & 1
This throws the parser for a loop.
Craig Newman
Thanks John & Corey.
Your two responses have helped with both cleaning-up the source list and
increasing the efficiency of the code.
Not to self... Get more comfortable with abstracting problems into arrays,
rather than relying on proving each step of the code by rendering into a field
- as a
Does this help you...?
on mouseUp
put empty into fld "result"
set itemDel to tab
replace comma with space in fld "source"
replace "." with space in fld "source"
replace space & "'" with space in fld "source"
replace "'" & space with space in fld "source"
replace "?"
I built a label with multiple lines, put "1 2 3/n2 3 4/n3 4 5" into it
and ran this line of code on it:
add 1 to word 2 of line 2 of field "field"
It worked just as you'd expect it to.
However, this seems a very slow way to do it.
Hashes work a treat for this kind of thing.
on mouseUp
11 matches
Mail list logo