12.0 Understanding Functions

In previous chapters, you created scripts that performed a variety of actions ranging from speaking messages to typing keystrokes and more. Each time you wanted to perform the script, you pressed the assigned keystroke and JAWS performed the associated script.

As you created these scripts, you called upon "built-in" functions. These types of functions are actually part of JAWS. Unlike the scripts you previously created, you will not find built-in functions within a JAWS script source file.

While built-in functions are not contained within the JAWS script source file, "user-defined functions" are.

User-defined functions are written both by Freedom Scientific and JAWS script developers. You create user-defined functions using the Script Manager.

In addition to built-in and user-defined functions, there are also "event" functions. JAWS automatically performs event functions each time an associated event occurs in the Windows operating system. For example, each time you press TAB to move from control to control within a dialog, you are causing the "focus changed" event to occur. Although you can see these functions within the script files that come with JAWS, you cannot create your own event functions.

This chapter introduces you to built-in and user-defined functions. You will gain a better understanding of built-in functions and their use. You will also learn how to create a user-defined function, pass parameters to a function, and return values using functions.

Table of Contents

Chapter 12.0 Understanding Functions, contains the following sections:

12.1 Functions, An Overview

12.2 Built-in Functions

12.3 User-defined Functions

12.4 Functions that Return Values

12.5 The Use Statement

12.6 Chapter Exercises

 

Back

Next