[jawsscripts] Re: Question about the FSDN possible improvements!!!

  • From: Udo Egner-Walter <udo.egner-walter@xxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Sun, 27 Sep 2020 11:55:55 +0200

Hi Csaba, 

again thank you very much for your comments. 

Once again you can see that creating scripts for others means more work. While 
creating the scripts itself can be quite fast sometimes it is on the other hand 
very time consuming to create the documentation and to follow the standards of 
FS regarding JSD files and the like. 

Thanks a lot for the hints that help me a lot and simplify the creation of 
scripts. 

Best regards 
Udo 

Am 26.09.2020 um 19:59 schrieb Csaba Árpádházy-Godo 
<arpadhazi68.jawsul@xxxxxxxxx>:

Hi Udo,

Control + W saves the active file without compiling namely without 
creating a binary script file. Control + S saves it with compiling, so 
it creates the JSB file, too.

One would think that these two menu commands work similarly, but 
practice shows that they do not. If you save the file without compiling 
by first synchronizing it with the documentation (Alt + F, D command), 
the entries will normally be included in the JSD file. that is, the 
parameters of the functions, their possible optionality. If you do the 
same with the Control + S command, the JSD file will contain only two 
lines of functions in most cases. An example to understand:

1. the contents of the script file that I wrote into it manually and did 
not use the Add New Function dialog.

string Function AddItemToList (int ItemID, string ItemName)

EndFunction

int Function SelectItem (int ItemId, optional int DeselectIt)

EndFunction

2. I sync the file with the documentation. That is, I choose Synchronize 
Documentation from the File menu.

3. I saved the changes.

3.1: In case of Control + W - save without compilation, the content of 
the JSD file in 95% of cases will be:

: function AddItemToList
: Returns string
: SearchRank 1
: Param int / ItemID
: Param string / ItemName

: function SelectItem
: Returns int
: SearchRank 1
: Param int / ItemId
: Optional
: Param int / DeselectIt

3.2 In the case of using Control + S, namely saving our file with 
compiling the JSD file in most cases will only contain the following lines:

: function AddItemToList
: SearchRank 1

: function SelectItem
: SearchRank 1

As I wrote, the practice for me to create the documentation was that 
once I am done with the script file, (that is, I no longer write new 
scripts and functions,) I open it in the Script Manager and after 
synchronizing the documentation I save with Control + W. Then, if the 
file doesn't contain a lot of declarations (about 10-15 scripts / 
functions), I use F2 to jump to the first line of inputs and press 
Control + S. In the dialog that appears, I fill in the fields on the 
first tab. I don't touch the Parameters tab. When I'm done, I go down 
and pess OK. Than F2 again, then Control + D. After about 3-4 
declarations, I usually save with Control + W so that the JSD entries 
from the memory are included in the JSD file.

If my file contains more than 15 declarations, I will manually edit the 
JSD file. In this case, I close the JSS file and open JSD. With Control 
+ N, I open a new, empty document in Cript Manager (it can be any file 
type, since I didn't save it anyway, I just use it as a clipboard) and 
create the necessary block to insert after the: SearchRank line:

: Synopsis [Short description of the function / script]
: Description [Detailed description of the function / script. This will 
appear in the Shift + F1 keyword help.]
: Category [Category of the given function / script]

Then I put these 3 lines on the clipboard, and then I start editing the 
JDF file. That is, I hit Enter at the end of the: SearchRank line, then 
I paste the above 3 lines with Control + V, and then fill it out. I also 
fill in the parameters. In other words, I include their descriptions one 
by one here as well.

I repeat these steps until the last declaration.

Namely, according to my observations, if a script file contains more 
declarations than 15 and I create the documentation using the panel that 
can be called with Control + D, then after a while, approx. 20 
declarations, SCript Manager crashes during saving process. The JSD file 
is saved completely blank. There may be some sort of memory management 
bug in the script manager. But it's been a long time since I've had 
similar issues with version 11.

HTH

Chaba


2020. 09. 26. 17:29 keltezéssel, Udo Egner-Walter írta:
Hello, Chaba,

First of all, many thanks for this detailed explanation and the tips it 
contains. I always think it's absolutely great how you and all the others 
(Bob, Doug, Snowman, just to name a few) give expert advice here. I would 
therefore like to thank you on behalf of all the others.

One more question: Under 2. you write that you press Ctrl+W to update the 
JSD file. But doesn't Ctrl+S do the same?

Best regards
Udo

Am 24.09.2020 um 21:23 schrieb Csaba Árpádházy-Godo 
<arpadhazi68.jawsul@xxxxxxxxx>:

Hi Udo,

of course you can ask. That is why this list is. :-)

I can understand that you hate to create functions / scripts with the
"Insert new script" dialog. Whoever created the JAWS script editor's
dialogs had no faint idea of ​​what the terms “user-friendly” and
“ergonomic” mean.
I think, most of scripters create their functions smoothly, simply by
typing them into the editor. In this case, the script editor -
unfortunately - is not "informed that a new script / function has been
created. So it is not included in the documentation file.

In this case, if we press Alt+F than D (File menu > Synchronize
documentation command) than the script editor usually updates the JSD
file. However, in the vast majority of cases, does it incorrectly.
Usually forgets to add the parameters of the functions.

For this reason, I always edit the JSD file manually. And most of the
time in the script editor. There are a few tricks to look out for:

1. Opening JSS Script Manager loads a copy of JSD into the memory.JSD

When you open a script file (JSS), the script editor loads the contents
of the JSD file into the memory. If you edit a JSD file with the
corresponding JSS file being opened, make sure that the script editor
does not update the information loaded into memory when saving the JSD
file. Therefore, if you save the JSS file, some of your changes to the
JSD file will be lost. Therefore, while I am editing the JSD file, I
will never modify the JSS, or if I finish modifying the JSD, I will
close both files and only then start modifying the JSS again if I reopen it.

2. Use Control+D (Edit script dialog) to spare work.

As I mentioned I write my scripts/functions per hand, too. When I wrote
the framework for the new function (the declaration and closing lines -
"xxx function xx (params) / EndFunction") than I always save my work by
pressing Control + W (Save without compiling). It ensures, that the
Script manager uptates the in memory copy of JSD file when saves my new
function framework.

3. When I finis a script file, I always take time to document my scripts
& functions. It means I fill the ":Synopsis, :Description & :Category"
fields in the JSD file.  To do it I use the Control+D (Edit script
dialog). Only in the case if my function has optional parameter do it by
hand.
This is because you cannot enter optional parameters via this dialog.
Thus, if you edit a function that has such a parameter, the optionality
is lost.

4. Descriptions of parameters

I do it always by hand in the JSD file.

By the way, the Control + e (Add new script) / Control + D (Edit script)
dialogs has some errors in their functioonality. For example: you can't
make a parameter optional, if you edit a function that has already a
short description, the dialog does not shows it. The same with the
category, and the return walue. You can't edit existing parameters, etc.)

HTH
Chaba



2020. 09. 24. 16:37 keltezéssel, Udo Egner-Walter írta:
Hi Csaba and list members,

I would like to ask another question off topic if I may.

To make entries in the JSD file yourself, you can press Ctrl+D in a 
script/function and fill in the necessary fields. However, I find it quite 
complicated to change or create functions using this.

Personally, I prefer to create the functions "by hand" and would therefore 
have the question: is it possible to open the JSD file with an editor and 
make the entries myself? Is there anything special to consider here?  How 
do you do that, e.g. to store a description for a parameter?

Up to now I have always edited the JSD file with an editor for scripts, 
but I haven't dared to use the functions yet. Does anyone have any 
suggestions, instructions or general ideas?

Thanks for suggestions
Udo

Am 24.09.2020 um 11:35 schrieb Csaba Árpádházy-Godo 
<arpadhazi68.jawsul@xxxxxxxxx>:

Theodore,

Bob is right. But instead of JSS you have to add the JSD file to your
script whre you would like to use UIA functions. So the correct line you
have to insert is:

Import “uia.jsd”

Studying the code in the UIA.jss file you can get many examples how to
use UIA.

HTH

Chaba

2020. 09. 23. 12:16 keltezéssel, Bob írta:
Add the line:
Import “uia.jss” to your jss file.
Save, close and reopen script manager.

Then take a look at the functions that appear in the insert function 
dialog that start fsuia.

You can also look in uia.jss at what they are doing.

Bob

On 23 Sep 2020, at 10:28, Theodore Cooke <theodorecooke@xxxxxxxxx> 
wrote:

Csaba, are there any shared scripts you think are a great starting
point? I have learned how to write scripts that interact with
Microsoft UI Automation, but I still haven't learned how to use the
vast majority of the functions in the insert functions dialog. They
mostly seem to use MSAA, but I just can't get the feel for MSAA.

On 9/12/20, Csaba Árpádházy-Godo <arpadhazi68.jawsul@xxxxxxxxx> wrote:
Reed,

These script are in the shared scripts folder of the JAWS. You can find
them in version 2020:

C:\ProgramData\Freedom Scientific\JAWS\2020\Scripts

HTH

Chaba


2020. 09. 11. 17:48 keltezéssel, Reed írta:
Hi Chaba,

Where might one find these "JAWS shared scripts"?

Thanks!

Reed
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
<jawsscripts-bounce@xxxxxxxxxxxxx>
On Behalf Of Csaba Árpádházy-Godo
Sent: September 11, 2020 5:28 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Question about the FSDN possible
improvements!!!

Hi Shan,

If you need code samples, than you have to study JAWS shared scripts.
They are inexhaustible collections of examples!
By the way, you can contact Vispero and could buy some overpriced 
script
writing training materials. But they contain "common script writing
guidelines" only.

On the other hand, the new FSDN much better than the previous ones! 
You
have to download it and look!

Chaba


2020. 09. 10. 19:58 keltezéssel, Shan Noyes írta:
Hi folks
A few years back I purchased an excellent Jaws course from Jackie
Mcbride.  Anyways, in the course she mentions and as I have 
discovered
that the FSDN is a pretty good resource, however, it does have some 
short
comings.  I agree with that statement coming from IBM Screen Reader 
days
and writing profiles because the programming supporting manuals 
actually
provided examples of code for each IBM screen reading function etc.  
Note
the FSDN  does not due that at all.

So I'm writing and asking if anyone is familiar with any such
improvements to the FSDN like manual from Freedom.

Thanks all and have a good day.



Shan Noyes
Technical Analyst - Systems Security
GIAC
W: 306 777-4830
C: 306 533-1440

NOTICE: This confidential e-mail message is only for the intended
recipients. If you are not the intended recipient, be advised that
disclosing, copying, distributing, or any other use of this message, 
is
strictly prohibited. In such case, please destroy this message and 
notify
the sender.

__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts


__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: