Yes, but you will require AppleScript (Mac) or Visual Basic / VBA (Win); VBS is not supported. You must also have the Portfolio client installed - the Network edition if v5, as v5 Desktop does not support scripting. If not already installed you can obtain the 'scripting extras' archive from your program CD or the Extensis downloads site. There is a separate but thematically similar set of examples for each OS. As well as compiled examples you can use in Portfolio, source files are provided (only during v5) which will aid you in getting to grips with Portfolio automation. There is also a PDF giving sketchy coverage of the automation object.
With VB/VBA you will need to add a reference to you project to either the Portfolio6.TLB (v6), Portfolio5.TLB (v5) or to the Portfolio.TLB (v4) along with any references you need. I encourage you to experiment with the source code Extensis provide (only with v5) and view the TLB's members in VB's Object Browser (click F2 when in the VB/VBA IDE). The VB source code contains no error trapping but a list of Portfolio error codes is provided in a text file and here. The sample scripts provided with v5 use either the v4 or v5 TLB and were compiled for use with VB5. The v6 sample scripts use VB6. No source code is provided for the v6 sample scripts, though the project report it is the v5.01 code re-compiled to use VB6.
Once you've made and tested your scripts they need to be placed in the \Scripts\ subfolder of any (Network) client installation that will be using the script. The script will be listed by its file name (e.g. myscript.exe) in the Scripts menu. This menu is only visible on the menu bar when a Catalogue file is open. Don't forget to allow for the facts that any other libraries or controls your project requires must be on all the end-users' PCs as well. For this reason you may need to create an installer.
Question: Can I make and use my own scripts? [FAQ00101.htm]
Last Update:- 31 May 2006
Site and articles © Mark Anderson 2001-2007 - Visit my home page