I would like to know if there is a possibility to execute VBScript functions from an external file, something like is done with Neobook scripts with the hpwPlayAction plugin?My idea is that if there are changes needed in the script this can be done without changing the main application.

Or some thing like this, the example below doesn't work and is only from NB actions:

I don't know about VBScript, and hopefully you can get what you wanted, Eric. I just want to mention here my npPasc plugin, which add scripting capabilities to NeoBook (also the hability to execute code from files, units, strings, etc.) using the venerable Pascal language. Sorry if I can't help at this time in the VBScript part...

My idea is mainly to export data to Excel sheets. Before I archived this with using Excel as a Database but this gave a lot of problems.Now I started to do the same with VBScript this gives a lot of advantages and it is a lot quicker. Fore example see below.But I would like to have the possibility to change the scripts without changing the main application.Of cause I know and have your "Great" npPasc plugin and using this, and exactly as the npPasc plugin I would like to do the same with VBScript and maybe JavaScript.

I would like to know if there is a possibility to execute VBScript functions from an external file, something like is done with Neobook scripts with the hpwPlayAction plugin?My idea is that if there are changes needed in the script this can be done without changing the main application.

The trick to making a Call command execute a predefined script from an external file at run time 9i.e. not have it automatically embedded inside your .exe file) ... is to do something like this ...

... since NeoBook does not know the value of the variable [externalCallFile] at compile time, it does NOT embed your function file (called myExternalFunction in my example above) ... when you distribute your .exe file, make sure that this file (on your Functions folder) is copied to the user's folder containing the .exe file.

Warning - this method of performing function Calls can present a security issue ... not only can a savvy user read the commands, he might even be able to make undesirable changes !!!

I would like to know if there is a possibility to execute VBScript functions from an external file, something like is done with Neobook scripts with the hpwPlayAction plugin?My idea is that if there are changes needed in the script this can be done without changing the main application.

The trick to making a Call command execute a predefined script from an external file at run time 9i.e. not have it automatically embedded inside your .exe file) ... is to do something like this ...

... since NeoBook does not know the value of the variable [externalCallFile] at compile time, it does NOT embed your function file (called myExternalFunction in my example above) ... when you distribute your .exe file, make sure that this file (on your Functions folder) is copied to the user's folder containing the .exe file.

Warning - this method of performing function Calls can present a security issue ... not only can a savvy user read the commands, he might even be able to make undesirable changes !!!

This something that I didn't know and could be also usable, maybe it would work with encryption.

There is no built-in encryption as far as I know.

You could build a scheme for yourself ...

a) encrypt the NeoBook generated Function file

b) deliver it with your .exe

c) before calling this external file, read into memory, decrypt it, save it to the Temp folder and Call the file in the Temp folder

Any Ideas to do the same when the script as text is saved in a database

I thought of that ... but in your case, you want the flexibility to update the script on an ongoing basis ... so you would have to ...

a) have a simple NeoBook program at your end to copy the contents of the (NeoBook generated) Function file into a "password protected and encrypted" Access Database

b) have the user ...

- save the database file in a specified folder in his machine- click a button in your Application that will copy the contents from this received Database to the main Database

c) and any time you need to Call this Function, you can copy it to a file in the user's Temp folder ... and Call it from there

Note: If the "Database of External Scripts" is not large (shouldn't be) ... you could just send the entire (updated) Database to the user ... and have him replace the existing one.

Note that with either scenario, ... the content of the function file HAS to be unencrypted at time of execution by NeoBook ... so. still possible for user to read its contents ... you might consider giving the unencrypted file (in the Temp folder) a random name each time ... and erase it soon after execution ... to make it that much more difficult for the user to read its contents.

Separately, if your script can be run inside an HTML document, you might consider something like this ...

I have now, mainly because of your great support, things running. I didn't had time to start with the Database storage of the functions but the idea is there:

1. The storage database will be MySQL.2. My idea is to store the functions as a file in a Blob field, encryption will not be needed I think in this case3. As I already am working on a admin tool for the application and I will also build in a system to manage the scripts. extract from BLOB > Edit > and Save back to the BLOB.4. User will, as you suggested, extract the function to his Temp Dir at time of use, and I will erase the function after use. The functions are only small text files so performance shouldn't be a problem.

I'm glad you came up with the idea how to use the functions as an external file, because I think that's the way to go with this. I'm already thinking about more possibilities with this. Further for, as you remember, my "Modular Application" concept brings this also more flexibility.