| || |
//USEUNIT or //USEUNITS for all
A search turned up a lot on //USEUNIT but not my question, it is multipart.
1: I was unable to find in the help if there is a //USEUNIT ALL and thus you would not need to list each script from the project. This would be useful when using a driver script. Like I am.
2: Can you list more than one per line like //USEUNIT LogIn, LogOut, StartApp, StopApp and so on.
3: The script unit name, can be the same as the function name BUT once you use the //USEUNIT ScriptName, the function you are calling inside must be a different name that the script name.
4: FYI, You can have more than one function with the same name in different scripts, but the driver script, will run the first match based on the order of the //USEUNIT statements in the driver script (Or that is what I have found so far).
After typing this I guess only two questions, is there a //USEUNIT All, and can you list more than one script for each //USEUNIT or //USEUNITS?
Re: //USEUNIT or //USEUNITS for all
1, 2. There's no way to do this. You need to include each unit on an individual line.
3, 4. Use the UnitName.FunctionName notation when calling your functions from external units. Don't omit the unit name.
BTW, you you have some 'library' code which you need to call anywhere, a more convenient approach is to keep it in a script extension (see the "Script Extensions" help topic).