Adding files to a module
When to use
Sometimes you want to store other files, eg reports, Excel, images, etc, in your module but you can’t.
Added a Files tab to the Modules screen.
How to use
You can focus the grid and press Insert on the keyboard to add a file.
The file is exported in the .vi file.
You can optionally give it a password.
Tip: You can change / remove the password by double clicking on the Has Password cell.
Using the file in a script
To use the file in a script, you call getFile(name, password, destFileName),
Example: getFile(“orchid.aom.view.html”, “password”, “c:\\folder\\view.html”)
Gets the file from the database and writes it to destFileName.
Returns:
-
0 = success
-
1 = not found
-
2 = bad password
-
3 = error
Password protecting a file
If you password protect the file then you’d want to password protect your script that calls getFile too.
Password protecting a file means users can’t see the file in the scripts folder and they can’t edit it without knowing the password.
If the file has no password then it will be in the scripts folder and you won’t need to use getFile.