Experts only: Don't proceed if you're not familiar with scripts, programs, services, and users in Windows. If you don't have this experience, you need to call an expert, possibly an IT specialist.

At various points of a project, you can run your own programs that manipulate documents, or do other things. This happens as part of automated actions, and not before a document is imported, or after a document is exported.

Because these programs run between import and export, they are also called midscripts.

Can't do this without templates: You can do this in projects created from project templates only.

When you use it to manipulate documents, midscripts work like this:

1.Something changes in the project. For example, the translator delivers a document. You want to make a change to the document before the next actor - Reviewer 1 maybe - gets it. Maybe you need to replace a term with another, or unlock segments but only if they contain a specific term. There are endless possibilities.

2.memoQ exports the document in the MQXLIFF format. This is a standard bilingual XML document.

3.The program runs through the document. This program must take an MQXLIFF file as input, and it must produce an MQXLIFF file. The format must not be changed - memoQ is quite sensitive to that.

4.memoQ updates the document in the project from the modified MQXLIFF file.

On the other hand, you may want to check or change something in the project, and not make a change inside a document. Switch to a different translation memory, or change a deadline - the list goes on. This is also possible:

1.Something changes in the project.

2.memoQ doesn't export any documents, but:

3.memoQ runs a program that connects to the memoQ server through the Web Service API, and makes a change to the project or related resources

Makes sense in online projects: Although you can set up local projects with midscripts, this makes sense mostly in online projects, on memoQ servers. This topic shows how you can set up a midscript in an online project.

Set up your server first: If you need to run midscripts in online projects, you must set up your server first. This is described in the What can you do? section, later in this topic.

You need to write or acquire the program: memoQ doesn't come with programs that make the necessary changes to documents or to the project. Either you need to write these, or acquire them from a programmer. Or, you can turn to Kilgray Professional Services, who will write it for you for a fee.

To prepare or touch up text documents, use the built-in Find and replace tool: To learn more, see the topic about the Find and replace script.

How to get here

Open Resource console. Choose Project templates.

To set up a template for online projects: Use an online template for this. Choose your memoQ server at the top of Resource console. Click Select.

Select the project template that you want to set up with automated actions that use custom scripts. Right-click the selection, and click Edit.

In the Edit project template window, choose Automated actions. On the Project automation tab, choose an event (a trigger) in the project. On the right, click the + sign. In the Select actions you want to add to the trigger window, select Execute custom code. Click Add.

The Specify custom code details window appears.

To change an existing automated action: If the Execute custom code action is already there in the Project automation tab, select it under Actions added to the custom trigger. Click the Settings icon_automated-action-settings icon next to it. The Specify custom code details window appears.

specify_custom_code_details

What can you do?

Prepare your server to run automation scripts

Set up a script for an online project

Run the midscripts in real life

To fix a faulty script while a project is going on

When you finish

To save the project template, and return to Resource console: Click OK.

Possible next step: After you finish working on the template, close the Resource console, and create a project from the template.

To continue working on the project template: choose another category, and fine-tune other settings.

To return to Resource console, and not save the project template: Click Cancel.