Edit template - Running custom scripts at the middle of a project (midscripts)

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 to manipulate documents or do other things. This happens as an automated action – differently than pre-import and post-export scripting.

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 user - 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 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 TMS 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 TMSs. This topic shows how you can set up a midscript in an online project.

Set up your server first: If you need this for 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 memoQ Business 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

  1. Open the Resource Console Resource console icon..
  2. On the left, click Project templates Project templates icon..
  3. Select the template you want to edit.

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

  4. Under the list, click Edit.
  5. On the left, click Automated actions.
  6. On the Project automation tab, choose an event (a trigger) in the project.
  7. On the right, click the + sign.
  8. In the Select actions you want to add to the trigger window, select Execute custom code.
  9. Click the Add button.
  10. The Specify custom code details window appears.

    specify_custom_code_details

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 selected trigger. Click the Settings icon_automated-action-settings icon next to it. The Specify custom code details window appears.

What can you do?

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.