I don't think using 'must_include' will help.
We're trying to prevent customers from seeing the logic that is held in the load script, this is part of our IP and just as you would not give customers the source code for a product, we don't intend giving them access to the load script.
I could imagine that this could be done per macro-API. There are the methods GetCovertScript and GetCovertScript available which are unfortunately not further documented but the following code returned the hidden script which is protected with the password "isHidden":
therefore I think it could be set, too although within a first try it didn't worked for me because anything with the syntax wasn't right - but I think if you played a while you will find the correct one.
Many thanks for that, that works a treat.
Using the SetCovertScript api call I can now:
- have all of my load scripts as 'unhidden' during development,
- they will be stored in external files which means that I can put them under source control,
- during my 'go live' process, I can run a program which concatenates all of my scripts, in order, into a single 'script' and then set it as the hidden script in my deployed qvw file.
A couple of things for anyone else who wants to try this:
The api call sequence that I used for this are:
OpenDocEx - on this call it doesn't seem to matter which 'accessmode' I used, they all allowed me to do what I wanted.
I also tried to issue multiple calls to SetCovertScript with the intention of placing my scripts into multiple tabs. This didn't work for me. After using the api calls the only script that was loaded was the one from the final call. For me this is not a problem and is why in the steps that I described above I included "concatenates all of my scripts, in order,".
The script that is loaded can contain a tab name in it (on the first line) in the form of:
///$tab Secret Load Script
If this is present then the tab will be named as shown ("Secret Load Script").
If the script doesn't have a '$tab' then it will be called 'Hidden Script'.
I hope this proves useful to someone else.