Re: clicktext and decimal numbers

2005-01-06 Thread Klaus Major
Hi Alex and Jonathan,
thanks a lot for your (partly philosophical ;-) answers...
I think i now have more solutions than i will ever need :-D
I LOVE THIS LIST!
(No monkey dance, however ;-)
Best from germany
Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: clicktext and decimal numbers

2005-01-06 Thread Lynch, Jonathan
For a spellcheck for a program at work - I had to make it so that it
selected the actual word, even if that word contained a dash. I did it
basically by starting with the character under the mouse click, then
counting to the left until reaching a space or linefeed or the beginning
of the field - then also counting to the right with similar limits.

The code is pretty simple, but you might be able to streamline it - my
programming skills are still in the amateur category:

On mousedown

put word 2 of mousecharchunk() into aaa
if ((character aaa of me <> " ") and (character aaa of me <>
linefeed)) then
  put aaa into aaaleft
  put aaa into aaaright
  put the number of characters in me into PPP
  repeat until stopvar = 1
if stopleft <> 1 then
  if ((character aaaleft of me = " ") or (character aaaleft of
me = linefeed)) then  
put 1 into stopleft
put (aaaleft + 1) into aaaleft
  else if (aaaleft = 1) then 
put 1 into stopleft
  else 
put (aaaleft - 1) into aaaleft
  end if
end if
if stopright <> 1 then
  if ((character aaaright of me = " ") or (character aaaright of
me = linefeed)) then
put 1 into stopright
put (aaaright - 1) into aaaright
  else if (aaaright = PPP) then
put 1 into stopright
  else
put (aaaright + 1) into aaaright 
  end if
end if
if (stopleft = 1) and (stopright = 1) then put 1 into stopvar
  end repeat
  
  put character aaaleft to aaaright of me into ccc
   end if

end mousedown


This script winds up with the word you clicked on being put into the ccc
variable. 

I use it to check against a list of words that are frequently used
improperly in medical/scientific writing, to make sure I don't miss a
possible mistake when editing submissions to our publication.

Cheers,

Jonathan



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Klaus
Major
Sent: Thursday, January 06, 2005 5:39 AM
To: How to use Revolution
Subject: clicktext and decimal numbers

Hi friends,

a happy 2005 to all of you!


Short question:

When clicking on decimal numbers like 12.34, "the clicktext"*** returns
"12", "." or "34", which is not very helpful if you need the complete 
number...

*** "clickcharchunk" and "clickchunk" etc... are working the same way 
:-(

Now i worked around this by setting the "textstyle" of those numbers to 
"link" and

  set the underlinelinks to false
  set the linkcolor to 0,0,0
  set the linkvisitedcolor to 0,0,0
  set the linkhilitecolor to 0,0,0

to make the numbers look like any other text.
Now "the clicktext" returns "12.34", which is what i want.

But this way other links do not look like links anymore, since these 
properties are
valid either globally or for a specific stack...

Does anybody have another solution for this phenomenon?
SHORT scripts preferred ;-)

Thanks in advance.


Regards

Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: clicktext and decimal numbers

2005-01-06 Thread Alex Tweedly
Klaus Major wrote:
Hi friends,
a happy 2005 to all of you!
Happy New Year to you too. 

Short question:
When clicking on decimal numbers like 12.34, "the clicktext"*** returns
"12", "." or "34", which is not very helpful if you need the complete 
number...

*** "clickcharchunk" and "clickchunk" etc... are working the same way :-(
Now i worked around this by setting the "textstyle" of those numbers 
to "link" and
[...]
But this way other links do not look like links anymore, since these 
properties are
valid either globally or for a specific stack...

Does anybody have another solution for this phenomenon?
SHORT scripts preferred ;-)
You could do this by setting the textColor of the numbers to something 
subtly different from the remainder of the text (e.g. 1,1,1 instead of 
black), and the testing the color of the clickChunk ?   (Obviously, only 
if you aren't already using mixed colour text :-)

If you can't do that and need to script a solution, then it becomes a 
philosophical question - what's a number ?
(Assume the click is between the "1" and the "2" in the following examples)

12  ?yes, value 12.
12.34 ?  yes, value 12 and a bit
-12.34 ?   yes probably, value negative 12 and a bit
+12.34 ?  yes probably
12.34; more text  ?   yes, value 12 and a bit with a semi-colon 
punctuation to follow
12.34. more text  ?  Maybe !  12 and a bit followed by a period ?  or 
maybe not.
12.34.56 ?   perhaps not, but perhaps yes
56.12.34 ?   probably not - would it be 56 and a bit or 12 and a bit ??
1234more text  ?  maybe
text1234more text ?  maybe

If you can give the right answer to some of these (either - "can't 
happen", or "don't care") then you can write a pretty short script to 
deal with it; if you can't ignore them, then the script may be rather 
longer.

-- Alex.
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.8 - Release Date: 03/01/2005
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: clicktext and decimal numbers

2005-01-06 Thread Klaus Major
Hi Robert,
Would something along the lines of the following work?
get word (the number of words of (char 1 to (word 2 of the 
clickCharChunk) of fld "xxx"))) of fld "xxx"
Way cool!
Got it to work with some brackets less ;-)
 put word the number of words of (char 1 to (word 2 of the 
clickCharChunk) of fld "xxx") of fld "xxx"

you may need to check first whether clickChar is a number or at least 
not a space or another word delimiter
Thanks, i really love one-liners :-)
And this list!
Robert
Regards
Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: clicktext and decimal numbers

2005-01-06 Thread Robert Brenstein
Hi Scott,
Recently, Klaus Major wrote:
Short question:
When clicking on decimal numbers like 12.34, "the clicktext"*** returns
"12", "." or "34", which is not very helpful if you need the complete
number...
*** "clickcharchunk" and "clickchunk" etc... are working the same way
:-(
...
SHORT scripts preferred ;-)
Ahem... ;-)
Maybe this could work:
function getTheText tField
  put fld tField into F
  put the clickChunk into T
  put value(T) into N
  if N is a number or N = "." then
put (word 4 of T) + 1 into C
repeat while (char C of F is a number or char C of F = ".")
  put char C of F after N
  add 1 to C
end repeat
put (word 2 of T) - 1 into C
repeat while (char C of F is a number or char C of F = ".")
  put char C of F before N
  add -1 to C
end repeat
return N
  else return the clickText
end getTheText
Regards,
Scott Rossi
Creative Director
Tactile Media, Development & Design
Yes, great, thanks, exactly what i was looking for!
...and was just too lazy to write it on my own :-D
Best from germany
Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de
Would something along the lines of the following work?
get word (the number of words of (char 1 to (word 2 of the 
clickCharChunk) of fld "xxx"))) of fld "xxx"

you may need to check first whether clickChar is a number or at least 
not a space or another word delimiter

Robert
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: clicktext and decimal numbers

2005-01-06 Thread Klaus Major
Hi Xavier,
thanks, but that would be far too easy ;-)
Actually the numbers can be anywhere inside a locked field...
Then try to find the space before and after the clickchunk...
Yep, that's what Scott already offered :-)
Still no submissions for logos for the RunRev sponsored GT car...
It's free, and you'll get car pictures too for your websites...
Sorry, i am not interested in GT cars/games at all...
You dont have to be intersted in GT cars...
It's free publicity for your website and or products for those who are
interested and will be exposed (and forced to eat my dust ;))
LOL :-D
...or bring some flowers to your funeral ;-)
cheers
Xavier
Best
Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: clicktext and decimal numbers

2005-01-06 Thread xbury . cs
>thanks, but that would be far too easy ;-)
>
>Actually the numbers can be anywhere inside a locked field...

Then try to find the space before and after the clickchunk...


>> Still no submissions for logos for the RunRev sponsored GT car...
>> It's free, and you'll get car pictures too for your websites...
>
>Sorry, i am not interested in GT cars/games at all...


You dont have to be intersted in GT cars... 
It's free publicity for your website and or products for those who are 
interested and will be exposed (and forced to eat my dust ;))

cheers
Xavier
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: clicktext and decimal numbers

2005-01-06 Thread Klaus Major
Hi Scott,
Recently, Klaus Major wrote:
Short question:
When clicking on decimal numbers like 12.34, "the clicktext"*** 
returns
"12", "." or "34", which is not very helpful if you need the complete
number...
*** "clickcharchunk" and "clickchunk" etc... are working the same way
:-(
...
SHORT scripts preferred ;-)
Ahem... ;-)
Maybe this could work:
function getTheText tField
  put fld tField into F
  put the clickChunk into T
  put value(T) into N
  if N is a number or N = "." then
put (word 4 of T) + 1 into C
repeat while (char C of F is a number or char C of F = ".")
  put char C of F after N
  add 1 to C
end repeat
put (word 2 of T) - 1 into C
repeat while (char C of F is a number or char C of F = ".")
  put char C of F before N
  add -1 to C
end repeat
return N
  else return the clickText
end getTheText
Regards,
Scott Rossi
Creative Director
Tactile Media, Development & Design
Yes, great, thanks, exactly what i was looking for!
...and was just too lazy to write it on my own :-D
Best from germany
Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: clicktext and decimal numbers

2005-01-06 Thread Klaus Major
Bon jour Xavier,
Hi Klaus,
if you have either a single column field list or a table, the
clickline/text or the
number of items in char 1 to the clickchar kind of op.
thanks, but that would be far too easy ;-)
Actually the numbers can be anywhere inside a locked field...
Still no submissions for logos for the RunRev sponsored GT car...
It's free, and you'll get car pictures too for your websites...
Sorry, i am not interested in GT cars/games at all...
hope that helps
Xavier
--
http://monsieurx.com
Au revoir mon ami
Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: clicktext and decimal numbers

2005-01-06 Thread Scott Rossi
Recently, Klaus Major wrote:

> Short question:
> 
> When clicking on decimal numbers like 12.34, "the clicktext"*** returns
> "12", "." or "34", which is not very helpful if you need the complete
> number...
> 
> *** "clickcharchunk" and "clickchunk" etc... are working the same way
> :-(
> 
> Now i worked around this by setting the "textstyle" of those numbers to
> "link" and
> 
> set the underlinelinks to false
> set the linkcolor to 0,0,0
> set the linkvisitedcolor to 0,0,0
> set the linkhilitecolor to 0,0,0
> 
> to make the numbers look like any other text.
> Now "the clicktext" returns "12.34", which is what i want.
> 
> But this way other links do not look like links anymore, since these
> properties are
> valid either globally or for a specific stack...
> 
> Does anybody have another solution for this phenomenon?
> SHORT scripts preferred ;-)

Maybe this could work:

function getTheText tField
  put fld tField into F
  put the clickChunk into T
  put value(T) into N
  if N is a number or N = "." then
put (word 4 of T) + 1 into C
repeat while (char C of F is a number or char C of F = ".")
  put char C of F after N
  add 1 to C
end repeat
put (word 2 of T) - 1 into C
repeat while (char C of F is a number or char C of F = ".")
  put char C of F before N
  add -1 to C
end repeat
return N
  else return the clickText
end getTheText


Regards,

Scott Rossi
Creative Director
Tactile Media, Development & Design
-
E: [EMAIL PROTECTED]
W: http://www.tactilemedia.com

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: clicktext and decimal numbers

2005-01-06 Thread xbury . cs
Hi Klaus,

if you have either a single column field list or a table, the 
clickline/text or the
number of items in char 1 to the clickchar kind of op.

Still no submissions for logos for the RunRev sponsored GT car... 
It's free, and you'll get car pictures too for your websites... 

hope that helps
Xavier
--
http://monsieurx.com

On 06.01.2005 11:38:39 use-revolution-bounces wrote:
>Hi friends,
>
>a happy 2005 to all of you!
>
>
>Short question:
>
>When clicking on decimal numbers like 12.34, "the clicktext"*** returns
>"12", "." or "34", which is not very helpful if you need the complete
>number...
>
>*** "clickcharchunk" and "clickchunk" etc... are working the same way
>:-(
>
>Now i worked around this by setting the "textstyle" of those numbers to
>"link" and
>
>set the underlinelinks to false
>set the linkcolor to 0,0,0
>set the linkvisitedcolor to 0,0,0
>set the linkhilitecolor to 0,0,0
>
>to make the numbers look like any other text.
>Now "the clicktext" returns "12.34", which is what i want.
>
>But this way other links do not look like links anymore, since these
>properties are
>valid either globally or for a specific stack...
>
>Does anybody have another solution for this phenomenon?
>SHORT scripts preferred ;-)
>
>Thanks in advance.
>
>
>Regards
>
>Klaus Major
>[EMAIL PROTECTED]
>http://www.major-k.de
>
>___
>use-revolution mailing list
>use-revolution@lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


clicktext and decimal numbers

2005-01-06 Thread Klaus Major
Hi friends,
a happy 2005 to all of you!
Short question:
When clicking on decimal numbers like 12.34, "the clicktext"*** returns
"12", "." or "34", which is not very helpful if you need the complete 
number...

*** "clickcharchunk" and "clickchunk" etc... are working the same way 
:-(

Now i worked around this by setting the "textstyle" of those numbers to 
"link" and

 set the underlinelinks to false
 set the linkcolor to 0,0,0
 set the linkvisitedcolor to 0,0,0
 set the linkhilitecolor to 0,0,0
to make the numbers look like any other text.
Now "the clicktext" returns "12.34", which is what i want.
But this way other links do not look like links anymore, since these 
properties are
valid either globally or for a specific stack...

Does anybody have another solution for this phenomenon?
SHORT scripts preferred ;-)
Thanks in advance.
Regards
Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution