Hi Leon,
Look at this script which is working, I used the selEnd and selStart
properties to get the cursor position. Hope this helps you.
on shiftHome me
pCursorPos = the selEnd
the selStart = 0
the selEnd = pCursorPos
end
on shiftEnd me
if the selection <> EMPTY then
pCursorPos = the selStart
else
pCursorPos = the selEnd
end if
the selStart = pCursorPos
the selEnd = field("field name").length
end
best regards
------------------------------------------
Ramesh CT
http://www.lingoman.net/
------------------------------------------
>>>
Say, for example, a user has scrolled to the 5th char in a 20 char word
using the arrow keys. By pressing SHIFT+HOME the 5 chars preceding the
cursor should be selected. I will set the selStart to 1 but how can I set
the selEnd - I need something like theCurrentCursorPosition. Equally, in
the above situation, pressing SHIFT+END would select the 15 chars after the
cursor position. Again, I can set the selEnd to the last char of the line,
but how do I set the selStart.
>>>
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.
-- Phoenix Global Solutions (India) Pvt Ltd., www.pgsolutions.com
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]