Macro Help Needed by Newbie
Submitted by Tuesday, 20 January, 2004 - 01:24
on
Hello and thanks for looking and helping me out. I am using version 4.1 final.
For my second macro, I wish to write a routine that allows me to prompt the user for a single character and then to replace every character position in a selected area with that user-supplied character. Seems like it sould be pretty simple.
What I am finding is that it is not as easy as I expected. It seems that when selections include areas beyond the end of a line, the values I get for the start and end positions on those lines are not what I expect. They are offets into the buffer and there is no accounting for the selected area that has "virtual" space. There appears to be no way (in the API) for me to find the on-screen bondaries of the selected area.
Any one have any ideas on how to do this?
Thanks,
David
Seattle, WA
For my second macro, I wish to write a routine that allows me to prompt the user for a single character and then to replace every character position in a selected area with that user-supplied character. Seems like it sould be pretty simple.
What I am finding is that it is not as easy as I expected. It seems that when selections include areas beyond the end of a line, the values I get for the start and end positions on those lines are not what I expect. They are offets into the buffer and there is no accounting for the selected area that has "virtual" space. There appears to be no way (in the API) for me to find the on-screen bondaries of the selected area.
Any one have any ideas on how to do this?
Thanks,
David
Seattle, WA