Bring your karma
Join the waitlist today
HUMBLECAT.ORG

Blind and Visually Impaired Community

Full History - 2021 - 08 - 18 - ID#p6uzbb
10
JAWS Scripting Tip: Optional Parameters (self.Blind)
submitted by Benilda-Key
I have published the blog post $1. I am sharing it here in the hopes that the members of the community will find it to be useful.

For those who wish to skip to the solution instead of reading the blog post, the following example explains how to specify a default value for optional parameters in a JAWS script function.

string function GetFavoriteNumberMessage(optional int number)
if (GetVariantType(number) == VT_EMPTY)
number = 42
endIf
var string message = FormatString("Hello. My favorite number is %1. What is your favorite number?", number)
return message
endFunction
Benilda-Key [OP] 1 points 1y ago
If you had difficulties reading the blog post, I updated $1 to use a much better and much simpler stylesheet.
This nonprofit website is run by volunteers.
Please contribute if you can. Thank you!
Our mission is to provide everyone with access to large-
scale community websites for the good of humanity.
Without ads, without tracking, without greed.
©2023 HumbleCat Inc   •   HumbleCat is a 501(c)3 nonprofit based in Michigan, USA.