Please be aware that I don’t recommend that you use PuTTY exclusively for SSH access. Especially in Windows 10. There are a number of better alternatives out there at this point for most day to day use. I’ll add links to one or two below. However, there are times when PuTTY or Putty as it’s pronounced is just the best tool for the job so it’s important that you can get some feedback from Jaws.

Note as of 26th October 2017

Please note that this post is now out of date. You should use these fantastic PuTTY scripts instead as they provide much more complete functionality.

I had posted a script before that worked with previous versions of Jaws and in fact, it would probably work with Jaws 18 as well but the SayNonHighlightedText function in Jaws 18 has been updated so it’s only right that I tweak it slightly and publish it here to be used in a PuTTY.jss file.

Here’s the code:

Include “HjGlobal.jsh” ; default HJ global variables
Include “hjconst.jsh” ; default HJ constants
Include “HjHelp.jsh” ; Help Topic Constants
Include “common.jsm” ; message file
include “MSAAConst.jsh”
include “UIA.jsh”

const
NavigationByLineTickThreshold = 200
globals
int LastLineNavigationTick

Void Function SayNonHighlightedText (handle hwnd, string buffer)
; NonHighlightedText Function for speaking all newly written nonhighlighted
; text.
If GetScreenEcho () > ECHO_NONE
&& hWnd == GetFocus()
If GetWindowClass(GetFocus()) == “PuTTY”
&& GetTickCount()-LastLineNavigationTick > NavigationByLineTickThreshold
;New text should be spoken only if it is not a result of navigation by line.
;This prevents double speaking when navigating through a command history,
;since the SayLineUnit will already have spoken the new text.
Say(buffer, OT_NONHIGHLIGHTED_SCREEN_TEXT)
;Now clear LastLineNavigationTick, just in case more new text appears shortly after the navigation.
LastLineNavigationTick = 0
Return
endIf
endIf
if (GetScreenEcho() > 1) then
Say (buffer, OT_NONHIGHLIGHTED_SCREEN_TEXT)
endIf
EndFunction

There are a number of great alternatives to PuTTY.
Over on Git Hub, Microsoft have a rather nice SSH Powershell module that provides a method of accessing an OpenSSH server on Linux from within Powershell.
The best way to use SSH on Windows in my opinion is to install Git. Be sure that you choose to make git features available from the command line so that you can use SSH without starting the Git Bash shell first.
Lastly, another really good option if you are using Windows 10 is to install Bash or Linux for Windows. This is an add on that you can install from within Programs and Features\Windows Features.

There are now more ways than ever to access your Linux servers over SSH from within Windows. Have fun!

1 Comment

  1. David Reynolds

    Hi, I think you may have solved another unrelated problem here. The command prompt in windows 10 no longer works. A modification of your putty script may well solve the problem. Excuse me while I go under the bonnet…

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.