background image
<< sbl Library Source Files | Global Header File >>
<< sbl Library Source Files | Global Header File >>
SQABasic Header Files
Adding Features to GUI Scripts
Using Library Source Files
To use an SQABasic library file at runtime, you must:
Add custom procedures to the library source file.
Compile the file. Both types of SQABasic library source files (extensions .sbl
and .rec) compile to a .sbx runtime file.
Declare the file in an SQABasic header file or directly in a script or library file
that will call the custom procedures.
Here is an example of declaring the sub procedure
in the library file
Declare Sub myProc BasicLib "Mylibrary" (arg as Integer)
And here is an example of declaring the function
in the .dll file
Declare Function myFunc Lib "Mylibrary" (ByVal PassVar) as Integer
For information about adding custom procedures to SQABasic library files and
about declaring library files (including .dll files), see the SQABasic Language Reference.
For information about compiling SQABasic library source files, see Compiling Scripts
and SQABasic Library Source Files
on page 5-7.
SQABasic Header Files
Header files let you declare custom procedures, constants, and variables that you
want to make available to multiple script and library source files.You can use Robot
to create and edit SQABasic header files. They can be accessed by all modules within
the project.
SQABasic files are stored in the SQABas32 folder of the project, unless you specify
another location. You can specify another location by clicking Tools >
Options. Click the Preferences tab. Use the Browse button to find the location.
Robot will check this location first. If the file is not there, it will look in the
SQABas32 directory.
SQABasic header files have the extension .sbh.
Creating and Editing Header Files
To create a new header file that can be accessed by any module in the project:
1. Click File
SQABasic File.
2. Click Header File, and then click OK.
You name the file (or accept the default name) the first time you save it.