Acest supliment adună diverse caracteristici pentru depanarea și testarea NVDA.
This add-on uses layered commands for all of the new commands it adds. The
entry point for these commands is NVDA+X; thus all the commands should be
executed by NVDA+X followed by another single letter or gesture. You can
list all the available layered commands pressing NVDA+X, H.
For the commands that you use more frequently, you can also define a direct gesture in the input gesture dialog.
The NVDA+X, Q command opens a dialog to specify some extra options before
restarting NVDA. The options that can be specified correspond to the
command line options that can be used with nvda.exe, e.g. -c for
config path, --disable-addons to disable add-ons, etc.
Pressing NVDA+X, E allows to report the last error logged without needing
to open the log. A second press clears the memorized last error.
Setarea "Redați un sunet pentru erorile înregistrate" a fost introdusă în NVDA 2021.3 și permite să specificați dacă NVDA va reda un sunet de eroare în cazul în care este înregistrată una.
This add-on provides an additional command (NVDA+X, shift+E) to toggle
this setting. You can choose:
Pentru NVDA anterior versiunii 2021.3, acest add-on oferă portarea inversă a acestei funcționalități și posibilitatea de a o controla cu ajutorul comenzilor de la tastatură. Cu toate acestea, caseta de bifare din panoul de setări avansate nu este portată înapoi.
Această caracteristică permite raportarea unor proprietăți ale obiectului de navigare curent fără a deschide vizualizatorul de jurnal.
Pentru a lista proprietățile unui obiect, mutați obiectul navigator la acesta și utilizați următoarele comenzi:
NVDA+X, upArrow: Selects the previous property and reports it for the
navigator object.NVDA+X, downArrow: Selects the next property and reports it for the
navigator object.NVDA+X, N: Reports the currently selected property for the navigator
objectNVDA+X, shift+N: Displays the currently selected property for the
navigator object in a browseable messageLista proprietăților acceptate este următoarea: nume, rol, stare, valoare, windowClassName, windowControlID, windowHandle, locație, clasa Python, clasa Python mro.
When using object navigation commands, you can also choose to have the
currently selected property reported instead of NVDA usual object
reporting. A toggle command, NVDA+X, control+N, allows to switch between
this custom reporting of objects and NVDA usual reporting.
For exemple, you may select "windowClassName" property and enable custom object reporting. Then when moving the navigator object to next or previous object, you will hear the object's windowClassName instead of usual reporting.
The script opener command allows to open the code of a script knowing its gesture.
To use it press NVDA+x, C and then the gesture of the script which you
want to see the code of. For example to see the code of the script that
reports the title of the foreground window, press NVDA+X, C and then
NVDA+T.
For this feature to work, you need to have configured your favorite editor's command in the add-on's settings. If you are not running NVDA from source, the location of NVDA source code should also have been configured.
The extended script description mode allows to have reported information on scripts without description in input help mode.
When the Extended script description mode is active, the input help mode
(NVDA+1) is modified as follows. If a script has no description, the
script's name and class are reported. If a script has a description, its
description is reported as usual. The gesture to activate or deactivate
this feature is NVDA+X, D.
Executarea unui gest legat de un script fără descriere în modul de ajutor pentru intrări, creați și o intrare pentru acest script în dialogul de gestionare a gesturilor. Această intrare se află într-o categorie dedicată numită „Scripturi fără descriere (modificați pe propriul risc!)”. Acest lucru permite adăugarea, ștergerea sau modificarea cu ușurință a gesturilor NVDA native pentru aceste scripturi. Rețineți totuși că se intenționează adesea ca un astfel de script să nu aibă nicio descriere pentru a împiedica utilizatorul să modifice gestul asociat. Într-adevăr, gestul poate fi definit pentru a se potrivi cu o tastă de comandă rapidă a aplicației. De exemplu, scriptul script_toggleItalic de pe NVDAObjects.window.winword.WordDocument este obligat să controleze+I și acest lucru nu ar trebui modificat deoarece gestul este transmis aplicației pentru a executa efectiv tasta de comandă rapidă.
Control+shift+I comută și în cursiv în Word, chiar dacă nu este raportat nativ de NVDA. Pentru ca rezultatul control+shift+I să fie raportat de NVDA ca control+I, ar trebui să efectuați următorii pași:
NVDA+X, D.NVDA+X, D.Eroare cunoscută: un script adăugat pentru o anumită clasă este vizibil chiar dacă managerul de gesturi este deschis într-un alt context.
While testing or working, you may want to mark a specific moment in the log, so that you can turn to it easily later when reading the log.
To add a marker message in the log, press NVDA+X, K.
A message as follows will be logged at INFO level:
-- NDTT marker 0 --
You can add as many markers as you want in the log. The marker's number
will be incremented each time you place a marker in the log; it will only be
reset when NVDA is restarted.
A log reader mode provides commands to ease log reading and analyzing. In
the log viewer window the log reader is enabled by default, thus log reading
commands are available immediately. In another text reading area such as an
editor (e.g. Notepad++) or a webpage (e.g. GitHub issue), you need to press
NVDA+X, L to enable log reader mode and use its commands. When you are
done with log reading and analyzing tasks, you can disable again NVDA+X, L
to disable the log reader mode.
Comenzile disponibile în modul cititor de jurnal sunt descrise mai jos.
Comandă cu o singură literă similară cu tastele de navigare rapidă a modului de navigare permit trecerea la diferite tipuri de mesaje de jurnal:
ERROR and CRITICAL)WARNING)INFO)DEBUGWARNING)IO)DEBUG)Apăsarea unei singure litere trece la următoarea apariție a acestui mesaj. Combinarea literei cu tasta Shift trece la apariția anterioară a acestui mesaj.
Sometimes, you may have to look at a log taken on a system in a foreignh language that you do not understand. E.g. the log was taken on a Chinese system / NVDA, whereas you only understand French. If you have Instant Translate add-on installed, you may use it in conjonction with quick log navigation commands to have speech messages translated.
If you want to disable speech translation, press T again.
În jurnal, unele linii se pot referi la codul sursă:
File "virtualBuffers\__init__.pyc", line 226, in _getStoryLength INFO - config.ConfigManager._loadConfig (22:45:26.145) - MainThread (16580): Input help: gesture kb(desktop):NVDA+t, bound to script title on globalCommands.GlobalCommands Poate doriți să deschideți fișierul care conține acest cod pentru a înțelege contextul urmăririi sau al mesajului înregistrat. Apăsați tasta C pentru a deschide acest fișier.
For this feature to work, you need to have configured your favorite editor's command in the add-on's settings. If you are not running NVDA from source, the location of NVDA source code should also have been configured.
NVDA oferă deja un backup a jurnalului sesiunii anterioare a NVDA; fișierul
se numește nvda-old.log. Uneori, totuși, poate doriți să accesați
jurnalele mai vechi, de ex. pentru că a trebuit să reporniți NVDA din nou
înainte să vă uitați la nvda-old.log. Acest program de completare vă
permite să configurați dacă doriți să faceți backup pentru jurnalele vechi
și câte dintre ele; acest lucru se face în setările
suplimentului.
A log manager dialog allows to view the backed up logs. It can be opened going to NVDA menu -> Tools -> Logs manager In this dialog, you can see the list of all the backup logs and perform various actions on the selected log:
Enter)Delete)control+C)You can also select multiple logs to perform an actions on all of them.
To be able to open a log, you should first have configured the Command to open a file in your favorite editor.
openCodeFileÎn consolă, puteți apela următoarea funcție pentru a vizualiza codul sursă care definește variabila myVar:
openCodeFile(myVar)
For this feature to work, you need to have configured your favorite editor's command in the add-on's settings. If you are not running NVDA from source, the location of NVDA source code should also have been configured.
Funcțiile openCodeFile pot fi apelate pe obiecte definite în codul NVDA
sau pe obiecte definite de suplimente. Nu poate fi apelat pe obiecte al
căror cod sursă nu este disponibil, cum ar fi modulele integrate Python.
Dacă nu ați importat încă obiectul în consolă, puteți, de asemenea, să
transmiteți numele acestuia ca parametru funcției openCodeFile.
Mai jos sunt exemple de apel în codul NVDA:
speech.speech.speak:
openCodeFile(speech.speech.speak)openCodeFile("speech.speech.speak") TextInfo:
openCodeFile(textInfos.TextInfo) copyToClipboard of the class
TextInfo:
openCodeFile(textInfos.TextInfo.copyToClipboard) openCodeFile(focus) api.py defining the module api:
openCodeFile(api) Puteți defini un script personalizat care va fi executat în spațiul de nume al consolei Python atunci când este deschis pentru prima dată sau dacă suplimentul este reîncărcat (NVDA+F3) după ce consola a fost deja deschisă.
De exemplu, scriptul vă permite să executați noi importuri și să definiți aliasuri pe care le veți putea folosi direct în consolă, după cum se arată mai jos:
# Various import that I want in the console.
import globalVars as gv
import core
import ui
# Aliases
ocf = openCodeFile
Scriptul consolei Python ar trebui să fie plasat în următoarea locație: pathToNVDAConfig\ndtt\consoleStartup.py
De exemplu:
C:\Users\myUserName\AppData\Roaming\nvda\ndtt\consoleStartup.py
Sometimes, you may want to see which part of the code is responsible for
speaking something. For this, you can enable the stack trace logging of the
speech function pressing NVDA+X, S. Each time NVDA speaks, a
corresponding stack trace will be logged in the log.
Notă: Puteți modifica fișierul scriptului direct pentru a corecta o altă funcție. Consultați toate instrucțiunile din fișier pentru detalii despre utilizare.
Many testers use NVDA in another language than English. But when reporting test results on GitHub, the description of the modified options or the messages reported by NVDA should be written in English. Its quite frustrating and time consuming to have to restart NVDA in English to check the exact wording of the options or messages.
To avoid this, the add-on provides a reverse translation command (NVDA+X,
R) allowing to reverse translate NVDA's interface such as messages, control
labels in the GUI, etc. This command uses NVDA's gettext translation to try
to reverse translate the last speech. More specifically, the first string
of the last speech sequence is reverse translated.
For example, in French NVDA, if I arrow down to the Tools menu named "Outils", NVDA will say "Outils sous-Menu o" which stands for "Tools subMenu o". If I press the reverse translation command just after that, NVDA will reverse translate "Outils" to "Tools".
Looking at the log afterwards, we can find the following lines:
IO - speech.speech.speak (23:38:24.450) - MainThread (2044):
Speaking ['Outils', 'sous-Menu', CharacterModeCommand(True), 'o', CharacterModeCommand(False), CancellableSpeech (still valid)]
This confirms that "Outils was the first string in the speech sequence.
In case the reverse translation leads to two or more possible results, a context menu is opened listing all the possibilities.
The result of the reverse translation is also copied to the clipboard if the corresponding option is enabled, which is the default value.
<a id="setări
Unele caracteristici ale suplimentului pot necesita o configurație specifică. Un panou de setări vă permite să le activați sau să controlați modul în care funcționează. Pentru a vizualiza și modifica aceste setări, accesați meniul NVDA -> Preferințe și selectați categoria NVDA Dev & Test Toolbox. Acest dialog de setări poate fi accesat și direct din dialogul Manager jurnal.
These settings are global and can only be configured when the default profile is active.
<a id="comandăDeschidereSetări
Some features allow to see content in your favorite editor. This includes the commands to view the source file from a log, from an object in the console or from a typed gesture, as well as the log manager's Open button.
Pentru a le folosi, mai întâi trebuie să configurați comanda care va fi apelată pentru a deschide fișierul în editorul dvs. preferat.
Comanda ar trebui să fie de forma:
"C:\path\to\my\editor\editor.exe" "{path}":{line}
Desigur, ar trebui să modificați această linie în funcție de numele real și locația editorului dvs. și de sintaxa folosită de acesta pentru a deschide fișierele.
{path} va fi înlocuit cu calea completă a fișierului de deschis și {line} cu numărul liniei în care doriți să fie setat cursorul.
Pentru Notepad++, de exemplu, comanda de tastat în consolă ar fi:
"C:\Program Files\Notepad++\notepad++.exe" "{path}" -n{line}
When using a command to view the source file from a log, from an object in the console or from a typed gesture, the file may belong to NVDA itself.
If you are not running NVDA from source, your NVDA only contains compiled files.
Thus you may specify here an alternate location where the corresponding source file will be found, e.g. the place where you have cloned NVDA source files, so that a source file can be opened anyway.
The path should be such as:
C:\pathExample\GIT\nvda\source
Desigur, înlocuiți locaţia sursei NVDA cu cea corectă.
Asigurați-vă totuși că versiunea fișierului sursă (de exemplu, GIT commit) este aceeași cu cea a instanței care rulează NVDA.
Caseta combinată Backup jurnale vechi permite activarea sau dezactivarea funcției. Dacă este activat, puteți specifica mai jos în "imitați numărul de back-up-uri numărul maxim de backup-uri de siguranţă pe care doriți să le păstrați. Aceste setări au efect numai la următoarea pornire a NVDA, când are loc backup-ul.
This option allows to choose if the reverse translation command also copies its result to the clipboard.
NVDA+X.
The existing commands have been modified accordingly. NVDA+X, R) to reverse translate the last spoken message.NVDA+X, C) to open the source code of the script
associated to the next pressed gesture.enter to open
the log, control+C to copy the log file and delete to delete a log
file.openCodeFile poate primi acum ca parametru obiectul
sau un șir care conține numele acestuia.openCodeFile și
comanda de deschidere a fișierului sursă corespunzător unei linii din
jurnal.[[!tag dev stable]]