WordStar shortcuts for Writer

Discussions about using 3rd party extension with OpenOffice.org

WordStar shortcuts for Writer

Postby JeJe » Sat Jan 20, 2018 1:43 pm

This is an unfinished (and slow plodding extension) for emulating WordStar shortcuts in Writer.

I've implemented some of them and have never had WordStar but have been using the jstar
text editor for how they function. So I may well have things not quite right.

The zip contains the extension, a keyboard configuration file (save your existing one first) and some instructions.
Attachments
Wordstar Shortcuts.zip
(29.67 KiB) Downloaded 99 times
Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 610
Joined: Wed Mar 09, 2016 2:40 pm

Re: WordStar shortcuts for Writer

Postby JeJe » Wed Mar 27, 2019 5:58 pm

For scrolling up and down these macros work for me in OOWriter:

Code: Select all   Expand viewCollapse view

sub doLineDown()
   doscrollEvent 0
end sub

sub doLineUp()
   doscrollEvent 1
end sub
sub doScreenDown()
   doscrollEvent 2
end sub

sub doScreenUp()
   doscrollEvent 3
end sub

sub doscrollEvent(i)
   comp =thiscomponent.currentcontroller.frame.getcomponentwindow
   compchild=comp.getAccessibleContext.getAccessibleChild(0)
   Vsbar=compchild.getAccessibleContext.getAccessibleChild(6)
   Vsbar.getAccessibleContext.doAccessibleAction(i)
end sub



Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 610
Joined: Wed Mar 09, 2016 2:40 pm

Re: WordStar shortcuts for Writer

Postby JeJe » Sat Apr 06, 2019 2:09 pm

Scrolling code amended for whether rulers showing or not
Note: I haven't put this code in the extension.

Code: Select all   Expand viewCollapse view
sub doLineUp()
   doscrollEvent 0
end sub

sub doLineDown()
   doscrollEvent 1
end sub

sub doScreenUp()
   doscrollEvent 2
end sub

sub doScreenDown()
   doscrollEvent 3
end sub


sub doscrollEvent(i)
   comp =thiscomponent.currentcontroller.frame.getcomponentwindow
   compchild=comp.getAccessibleContext.getAccessibleChild(0)
   Vsbar=compchild.getAccessibleContext.getAccessibleChild(compchild.getAccessibleContext.getAccessibleChildcount -1)
   Vsbar.getAccessibleContext.doAccessibleAction(i)
end sub




Edit: I mixed up the down and up integer values:corrected
Edit2: corrected screendown function - meant to be 3

Edit 3 note does not work in LibreOffice


Edit 4:
sub doscrollEvent version that seems to work for both LibreOffice and OpenOffice

Code: Select all   Expand viewCollapse view

sub doscrollEvent(i)
   dim found as boolean
   found = false
   comp =thiscomponent.currentcontroller.frame.getcomponentwindow
   compchild=comp.getAccessibleContext.getAccessibleChild(0)
   on error resume next
   for j = 0 to compchild.getAccessibleContext.getAccessibleChildcount -1
      with compchild.getAccessibleContext.getAccessibleChild(j)
         if .getAccessibleContext.getAccessibleName = "Vertical scroll bar" then found = true
         if found then
            .getAccessibleContext.doAccessibleAction(i)
            exit for
         end if
      end with
   next
end sub
Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 610
Joined: Wed Mar 09, 2016 2:40 pm


Return to Extensions

Who is online

Users browsing this forum: No registered users and 2 guests