|
| Cursor position puzzle |
 |
Mon, 12 Jun 2006 21:06:03 -023 |
Hi,
Something is puzzling me about how cursor position intersects with
positioning commands such as PosLineEnd and PosLineBeg.
When running my macro I normally select words by double-clicking the mouse.
If that happens to be the last word in a line, and if there is space
following that word, WP selects both the word I double-clicked on, and the
following space to the actual end of the line. This can have unexpected
(to me) results if the next statement in the macro happens to be PosLineBeg
(): rather than jumping to the beginning of the line, the cursor moves to
the beginning of the following line. And if the next command happens to be
PosLineEnd() the same thing happens.
If on the other hand I simply select the word by holding down the left mouse
button and move the cursor over the word, only the word itself is selected,
and then the same commands behave differently. I.e., PosLineBeg does
indeed move it to the beginning of the line containing the selected word,
and PosLineEnd moves it to the end of the current line.
I'm expecting the cursor always to move to the beginning or end of the
current line, but that seems not to be the case. My workaround is to
insert PosCharPrevious before the PosLineBeg or PosLineEnd command. I can't
use SelectOff since that positions the cursor after the selection, and hence
at the beginning of the next line.
Have I missed something about how these things interact? Are there other
solutions that do not involve moving the cursor left first? Should I be
testing for the code following the selected text to see if it a soft return?
Bill
|
| Post Reply
|
| Re: Cursor position puzzle |
 |
Mon, 12 Jun 2006 22:08:16 -060 |
Bill Schipper wrote:
> My apologies. This belongs in the corel.WordPerfect12 group.
Whew! I was getting extremely nervous!!!
--
Joell Haugan -
Corel WPOffice/Presentations
Volunteer C-Tech (Canada)
*Please Respond Only to newsgroup*
http://haugan.no-ip.org/presentations/
|
| Post Reply
|
| Re: Cursor position puzzle |
 |
Mon, 12 Jun 2006 22:25:11 -023 |
My apologies. This belongs in the corel.WordPerfect12 group.
"Bill Schipper" <schipper@mun.ca> wrote in message
news:448df9dc$1_1@cnews...
>
> Hi,
>
> Something is puzzling me about how cursor position intersects with
> positioning commands such as PosLineEnd and PosLineBeg.
>
> When running my macro I normally select words by double-clicking the
> mouse. If that happens to be the last word in a line, and if there is
> space following that word, WP selects both the word I double-clicked on,
> and the following space to the actual end of the line. This can have
> unexpected (to me) results if the next statement in the macro happens to
> be PosLineBeg (): rather than jumping to the beginning of the line, the
> cursor moves to the beginning of the following line. And if the next
> command happens to be PosLineEnd() the same thing happens.
>
> If on the other hand I simply select the word by holding down the left
> mouse button and move the cursor over the word, only the word itself is
> selected, and then the same commands behave differently. I.e.,
> PosLineBeg does indeed move it to the beginning of the line containing the
> selected word, and PosLineEnd moves it to the end of the current line.
>
> I'm expecting the cursor always to move to the beginning or end of the
> current line, but that seems not to be the case. My workaround is to
> insert PosCharPrevious before the PosLineBeg or PosLineEnd command. I
> can't use SelectOff since that positions the cursor after the selection,
> and hence at the beginning of the next line.
>
> Have I missed something about how these things interact? Are there other
> solutions that do not involve moving the cursor left first? Should I be
> testing for the code following the selected text to see if it a soft
> return?
>
> Bill
>
>
|
| Post Reply
|
|
|
|
|
|
|
|
|
|