Jeremy,
if you want to overwrite or extend the default functionality of JAWS,
than you are on the bad track playing with MyExtensions.jss. JAWS using
the so called "fall-back" system in its handling of scripts. It means,
that user's scripts are preceded over shared ones. So the subsystem
first looks the scripts in the user's settings forder, and if there
found nothing, than in the shared folder.
So if you want to overwrite default.jss, than you have to declare your
new version of the default.jss in your user settings folder. This file
should contain only the functions you want to overwrite.
Below you will find a complete default.jss file With some overwritten
and extended functions. This will show you how to overwrite and extend
JAWS default functionality.
++ start of sample ++
;#~ JAWS default script file - Updated default functions and scripts
;#~ Default.jss
;:;#~ Version: 2020
;#~ (c) 2012-2019 by Csaba Árpádházy-Godó
;#: Include directrives
include "Scripting (Freedom).jsh"
include "Scripting (Constants).jsh"
include "Scripting (event names).jsh"
;include "default.jsh"
;include "default.jsm"
; use directrives
use "default.jsb"
use "Default (Event extensions).jsb"
use "Default (Extensions).jsb"
use "Default (Laptop).jsb"
use "default (Editor).jsb"
use "Default (Script language).jsb"
use "Default (Test engine).jsb"
; Import directrives
;:[ Modified scripts ]:
; Unification of reading line command
Script ReadCurrentRow ()
; Unifies reading of selected texts
; JAWSKey + Shift + UpArrow reads in non-table controls the selected text
If !InTable() Then
PerformScript SaySelectedText ()
Return
Else
PerformScript ReadCurrentRow ()
If StringLength (GetSelectedText ()) Then
PerformScript SaySelectedText ()
EndIf
EndIf
EndScript ; ReadCurrentRow
Script SaySystemTime ()
var
string sTimeOrDate,
string sNameday = SysGetDate ("MMdd"),
string sPath = FindJAWSSettingsFile ("nevek.ini"),
string sName = IniReadString ("names", sNameDay, cNullstring, sPath)
; TODO: saying namedays and events -> from Windows Calendar (API!)
Delay (2)
if GetRunningFSProducts() == product_MAGic
&& IsSpeechOff() then
ExMessageBox(FormatString(cMsgGetSysTimeAndDate,SysGetTime(),SysGetDate()),
cscNull,MB_ICONINFORMATION)
return
endIf
If (IsSameScript ()) then
sTimeOrDate = FormatString (cmsgGetSysDate, SysGetDate ())
sTimeOrDate = sTimeOrDate + cComma + cSpace
+ sName
Else
Delay (1)
sTimeOrDate = FormatString (cmsgGetSysTime, SysGetTime ())
EndIf
SayUsingVoice ( VCTX_MESSAGE, sTimeOrDate,
ot_user_requested_information)
EndScript ; SaySystemTime
Script SelectCurrentItem ()
; Unifies line selection in every possible control.
; Keystroke: Control + Spacebar
var
int iTypeCode = GetObjectTypeCode (),
int iSubTypeCode = GetObjectSubtypeCode (),
int iState = GetObjectStateCode ()
SayCurrentScriptKeyLabel ()
If iTypeCode == WT_EDIT Then
PerformScript SelectLine ()
Return
EndIf
TypeKey (cksSelectCurrentItem)
;sayinteger (istate)
;sayinteger (iTypecode)
;sayinteger(isubtypecode)
If (iSubTypeCode == WT_LISTBOXITEM) && iState == 257 then
SayMessage (OT_USER_REQUESTED_INFORMATION, "Not selected")
Return
EndIf
If ( iSubTypeCode == WT_EXTENDEDSELECT_LISTBOX) then
SayLine()
Return
EndIf
EndScript ; SelectCurrentItem
Script ControlUpArrow ()
; In edit controls, it selects the current word
; Created: 12 April, 2020
If ControlIsEditLikeControl () Then
SelectWord ()
Return
EndIf
PerformScript ControlUpArrow ()
EndScript ; ControlUpArrow
Script CloseListBox()
;
; Created: 12 April, 2020
If ControlIsEdit () Then
Return SetSelectiontoUpperCase ()
EndIf
PerformScript CloseListbox ()
EndScript ; CloseListbox
++ end of sample ++
And there is the skeleton of the default.jss with the most important
entries.
++ start of sample ++
; custom default.jss
Include "HJGlobal.JSH"
Include "HJConst.JSH"
Include "Common.JSM"
use "default.jsb" - it is very important, because it links the default
functionality to your script
++ End of sample ++
MyExtensions.jss is only to extend JAWS with new capabilities and not
for overwriting default functionality.
A helpful trick for debugging: Often happens that because some
mistypings or errors the run of the overwritten script or function
chrases and also debugging will be difficult. Than it could help, if you
close running JAWS version and start the previous one. I use version
2020 but if my redesigned functions crashing than I start 2019. So the
Script Editor v. 2020 will be handled by the default script running in
version 2019. Because of the script debugging functionality is a
built-in one of the Script Editor app, so changing running JAWS version
will not modify it.
In the last time I worked on the extension of default Say functionlity
and many times I runned into mistypings causing completly crashing some
Say functions like SayLine (). Than starting JAWS 2019 I could find the
errors and could correct them. To thest the corrected script I restarted
JAWS 2020.
HTH
Chaba
2020. 04. 14. 7:40 keltezéssel, Bob írta:
Start with hjconst.jsh and worry about anything else if something doesn’t__________�
work.
Bob
On 14 Apr 2020, at 03:04, jeremy.richards7@xxxxxxxxx wrote:
Well, as a newbie, how does one determine what he/she will need in regards
to the include statements.
JR
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx <jawsscripts-bounce@xxxxxxxxxxxxx> On
Behalf Of Bob
Sent: Monday, April 13, 2020 1:09 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: What to include in my personal MyExtensions.jss
file
Copying all that from the default is unnecessary.
Only add the include and use lines that you actually need.
Bob
On 13 Apr 2020, at 08:40, jeremy.richards7@xxxxxxxxx wrote:
Hi all,
I want to more aggressively pursue JAWS scripting, and because I will
of course be modifying various default script files, I want to play it
safe so thought I would ask the much more knowligable scriptors how to
proceed. Here’s the plan, please tell me if I’m on the right track. 😊
I am going to create and place a myExtensions.jss file within my main JAWS
enu folder at the following path:
C:\Users\My computer name\AppData\Roaming\Freedom
Scientific\JAWS\2020\Settings\enu
I will then copy and paste to MyExtensions.jss file the following info from
the main JAWS default.jss file:
Include "HjGlobal.jsh" ; default HJ global variables Include
"hjconst.jsh" ; default HJ constants include "MSAAConst.jsh"
include "UIA.jsh"
include "XMLDom.jsh"
include "FSIMouseSpeech.jsh"
Include "HjHelp.jsh" ; Help Topic Constants Include "common.jsm" ;
message file include "MAGic.jsm"
Include "JTController.jsm"
;Next two includes for Personalize Web Setting and other IE info.
include "IECustomSettings.jsh"
include "IE.jsm";For Personalize Web Setting and other IE info.
Include "magic.jsh"
Include "magcodes.jsh"
include "WinStyles.jsh"; Win Style Bits Constants used by the
GetWindowStyleBits function use "UIA.jsb"
use "HomeRowWindows.jsb"
use "HomeRowMSAA.jsb"
use "HomeRowUIAObject.jsb"
use "HomeRowXMLDom.jsb"
use "magic.jsb"
use "say.jsb"
use "FSXMLDomFunctions.jsb"
use "touch.jsb"
use "Braille.jsb"
use "FSIMouseSpeech.jsb"
Use "Virtual.jsb"
use "TutorialHelp.jsb"
use "UserBufferTemp.jsb"
use "AIMHelper.jsb"
use "MSNHelper.jsb"
use "yimhelper.jsb"
use "VKeyboard.jsb";For the Select Symbol To Print dialog.
use "htlib.jsb"
use "ph.jsb"
use "FileIO.jsb" ; CollectionToFile and FileToCollection (ini-style).
use "uoSayAllSchemes.jsb"
Use "UserOptions.jsb"
Use "VerbosityCore.jsb"
Use "VoIPHelper.jsb"
use "SkypeWatch.jsb"; Manages Skype Alerts in background.
use "LyncWatch.jsb" ; Skype for Business bakground alerts use
"myExtensions.jsb"
use "LiveResourceLookup.jsb"
Use "QuickSet.jsb" ; For Quick Settings functions / callbacks.
Use "deprecated.jsb" ;speak messages about deprecated script functions
use "SmartNav.jsb"
What do you guys think? Is this a good or bad idea? Is it really this
simple, or am I dreaming? Again, the goal is not to accidentally corrupt my
default script files.
Thanks,
JR
__________
View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts
__________
View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts
__________�
View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts
__________�
View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts