News:

Attempted Spam We have quite a large number of psudo-members register with our site for the sole purpose of posting spam messages. We have systems in place that prevent messages from new registrants from appearing on the forums. If you are a genuine member, please be patient and your message will appear once checked by a moderator.

Main Menu

Changing overlap for ^C and ^R

Started by RJSawyer, July 31, 2012, 07:49:42 AM

Previous topic - Next topic

RJSawyer

Hi, Mike. I love your WordStar emulatior.  Thank you!

In actual WordStar for DOS, one can use WSCHANGE to alter how much overlap -- including none -- there is when you do a ^C or a ^R command, but with the emulator, it's hardcoded to overlap by about three lines, it seems.  I'd like to reduce that so that the overlap is zero or one line.  Is there any way to do that?  Altermatively, is there any way to move your ^C and ^R macros to other keys and add in new ones of my own that do what I want?

In WordStar for DOS, I have no overlap, but in Word, I'd want to repeat any partial line (characters halfway on the screen at the bottom of the screen).

Many thanks!

Rob

Robert J. Sawyer
Science Fiction Writer
http://sfwriter.com

Forum Admin

Hi Rob,

I've glad that you like the emulator!

The scroll is a bit of a fiddle because of the WYSIWYG display, which isn't an issue in WordStar.

The current code goes through the following steps:

  • Check a document is open to prevent an error - can't scroll if no document
  • Save current position for ^QP
  • Turn off screen updates - stops the display jumping
  • Move the cursor down by about the window height
  • Move the displayed content down a big step
  • Move the displayed content back up 2 small steps (the 3-line overlap)
  • Move the cursor to the start of the line - can't maintain horizontal position with proportiona fonts
  • Turn the display updates back on
  • Make sure Word doesn't display the wrong  cursor

In code this is (for ^C)

Sub CTRL_C()
'
' WordStar Scroll Screen Down
' Overcomes built in functions scroll by 60%ish
' Doesn't maintain cursor horizontal position
'
    ' Quit if no documents open, but force cursor to normal first
    If Application.Documents.Count > 0 Then
       
        ' Log current position for ^QP
        wsSetMarker "QP"
       
        Application.ScreenUpdating = False
        Selection.MoveDown Unit:=wdWindow, Count:=1
        ActiveWindow.LargeScroll Down:=1
        ActiveWindow.SmallScroll up:=2
        Selection.MoveStart Unit:=wdLine
        Application.ScreenUpdating = True

    End If

    ' Fix cursor lock up
    System.Cursor = wdCursorNormal

End Sub


I've created a new version of the emulator which will probably let you achieve what you want. This has an added Settings dialog, accesible through ^JS - I couldn't think of a suitable place other than within the Help - ^EP (Edit Preferences) isn't possible.

The new version will let you change the SmallScroll between zero and 10 - you'll probably want zero.

I'll send you a copy to try out - just back up the old version and install the new one. Let me know if it does what you need.


All the best
Mike

Forum Administrator
WordStar Resource Site

Join the WordStar mail list at Yahoo Groups

RJSawyer

Wow!  That's service!  Thank you so, so much, Mike!  The new version does the trick -- I'm very pleased!  Thanks again!

Rob

Forum Admin

Thanks Rob!

If anyone else also wants the option to chenge the scroll overlap the updated version will be available on request.


Regards
Mike
Forum Administrator
WordStar Resource Site

Join the WordStar mail list at Yahoo Groups