Scripting Projects in Authentic Desktop

www.altova.com Imprimer cette rubrique Page précédente Un niveau supérieur Page suivante

Accueil >  Programmers' Reference > Scripting Editor > Overview >

Scripting Projects in Authentic Desktop

All scripts and scripting information created in the Scripting Editor are stored in Altova Scripting Projects (.asprj files).

 

You can create any number of Altova Scripting Projects. After a scripting project has been created, it can be used in the following ways:

 

It can be set as the global scripting project for Authentic Desktop. Scripts in the global scripting project can then be called from within the application, and macros of the Global Scripting Project can be used for all Authentic Desktop projects.
It can be assigned to an Authentic Desktop project (as an application project). When an Authentic Desktop project is open in Authentic Desktop, scripts in the associated scripting project can be called.

 

Your Authentic Desktop package contains a sample scripting project called SampleScripts.asprj. This file contains global declarations for a few standard tasks and is located in the folder: C:\Users\<username>\Documents\Altova\Authentic Desktop2019\AuthenticExamples.

 

 

Setting the global scripting project of an application

The global scripting project of an application is set in the Scripting tab of the Options dialog of Authentic Desktop (screenshot below, Tools | Options).

 

ScrSetGlobalScrPrjAuth

To set a global scripting project for Authentic Desktop, check the Activate Scripting check box and then browse for the Altova Scripting Project (.asprj) file you want. You can also specify: (i) whether Auto-Macros in the scripting project should be automatically executed when Authentic Desktop starts, and (ii) whether application event handler scripts in the project should be automatically executed or not; check or uncheck the respective check boxes accordingly.

 

Note:Nested script execution is possible, i.e. Macros can call other macros, and events are received during macro, or event, execution.

 

 

 

Assigning a scripting project to an Authentic Desktop project

A scripting project is assigned to an Authentic Desktop project as follows:

 

1.In the Authentic Desktop GUI, open the required application project.
2.Select the menu command Project | Script Settings. The Scripting dialog (screenshot below) opens.

 

ScrMacrosAutoRunSPPAuth

 

3.Check the Activate Project Scripts check box and select the required scripting project (.asprj file). If you wish to run Auto-Macros when the Authentic Desktop project is loaded, check the Run Auto-Macros check box.
4.Click OK to finish.

 

Note:To deactivate (that is, unassign) the scripting project of an Authentic Desktop project, uncheck the Activate Project Scripts check box.

 


© 2019 Altova GmbH