Pages in topic:   [1 2] >
Can you record a find-and-replace macro in MemoQ?
Thread poster: John Barber
John Barber
John Barber
United States
Local time: 08:18
German to English
Mar 28, 2022

Howdy,

Can you record a macro in MemoQ (like in Word)? I'd like to find and replace the same words in all my projects by simply running a macro. The MemoQ documentation itself doesn't seem to be a good place to learn anything about this, so I'm turning to you!

(I'm working with MemoQ 9.4.8 - provided by my client - with some options unavailable.)


 
Tomás Cano Binder, BA, CT
Tomás Cano Binder, BA, CT  Identity Verified
Spain
Local time: 15:18
Member (2005)
English to Spanish
+ ...
Not possible - Suggest to use Autohotkey Mar 29, 2022

As far as I am aware (I have used memoQ since 2009), memoQ does not have macro recording features.

I would suggest that you use a different macro recording possibility. There is good software out there for these things. If you have some programming abilities, you might want to go for Autohotkey. I use Autohotkey all the time for this kind of situations.

Good luck!


 
Dan Lucas
Dan Lucas  Identity Verified
United Kingdom
Local time: 14:18
Member (2014)
Japanese to English
Or edit the files directly? Mar 29, 2022

Tomás Cano Binder, BA, CT wrote:
If you have some programming abilities, you might want to go for Autohotkey. I use Autohotkey all the time for this kind of situations.

I use AHK for all kinds of things, so in theory I second this suggestion. In practice, however, I would be wary of using it for an interactive process like search/replace - too much to go wrong.

Here's a different idea: if MemoQ .xliff files are essentially text (XML) files like the .xliff files used by Trados, you might consider doing a find and replace on those files directly. I used this approach successfully for a year or so when I had a need to pre-process Transit NXT files. Obviously you'd want to be very careful and do some tests on a dummy file, but simple replacements would probably work fine. Things like "John Barber" → "Mr J Barber", for example.

You'd need a text file (grep) find and replace utility. The almighty but expensive PowerGREP would be overkill. There are free alternatives such as GrepWin and the more modern-looking dnGrep.

Dan

[Edited at 2022-03-29 11:56 GMT]


 
Tomás Cano Binder, BA, CT
Tomás Cano Binder, BA, CT  Identity Verified
Spain
Local time: 15:18
Member (2005)
English to Spanish
+ ...
Notepad++ is a good option Mar 29, 2022

Dan Lucas wrote:
Here's a different idea: if MemoQ .xliff files are essentially text (XML) files like the .xliff files used by Trados, you might consider doing a find and replace on those files directly.

Absolutely. I do that very frequently and use Notepad++ for that. It works beautifully also with large amounts of files as it allows you to search and replace in files without opening them!


Dan Lucas
 
Michael Beijer
Michael Beijer  Identity Verified
United Kingdom
Local time: 14:18
Member (2009)
Dutch to English
+ ...
run F&R on the memoQ .mqxliff files in EmEditor Mar 29, 2022

Yup, I'd probably run the F&R on the memoQ .mqxliff files in EmEditor (the best text editor on Windows, IYAM). EmEditor can do all kinds of crazy stuff, even macros/scripts, etc. and can run operations of tons of files at the same time.

https://www.emeditor.com/


Tomás Cano Binder, BA, CT
Stepan Konev
 
Renquan Yang
Renquan Yang  Identity Verified
China
Member (2007)
English to Chinese
+ ...
Could you please give some details on how to work with MemoQ in combination with Autohotkey Mar 29, 2022

Dear Thomas,
About 5 years ago, I tried to work with Autohotkey to perform the repetitive F&R steps under MemoQ. However, I could not find a feasible way to do translation in MemoQ while getting help from Autohotkey for I was not good at programming indeed.

Could some details on how to work with MemoQ in combination with Autohotkey be disclosed? The version of my MemoQ is 9.4.8.

Many thanks in advance for indication.

Tomás Cano Binder, BA, CT wrote:

As far as I am aware (I have used memoQ since 2009), memoQ does not have macro recording features.

I would suggest that you use a different macro recording possibility. There is good software out there for these things. If you have some programming abilities, you might want to go for Autohotkey. I use Autohotkey all the time for this kind of situations.

Good luck!


 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 16:18
English to Russian
Replace in all documents of a project Mar 29, 2022

You can batch replace in all files per project.

 
Tomás Cano Binder, BA, CT
Tomás Cano Binder, BA, CT  Identity Verified
Spain
Local time: 15:18
Member (2005)
English to Spanish
+ ...
It requires some programming skills Mar 29, 2022

Renquan Yang wrote:
Could some details on how to work with MemoQ in combination with Autohotkey be disclosed? The version of my MemoQ is 9.4.8.

Unfortunately it would take me a very long time to explain how to use Autohotkey in general, especially because we would have to begin with how to make a simple computer programme/script. In any case, Autohotkey is totally independent from memoQ, and simply runs on Windows. Whatever you can basically type with the keyboard (like shortcuts, text, etc.) you can do with Autohotkey.


 
Renquan Yang
Renquan Yang  Identity Verified
China
Member (2007)
English to Chinese
+ ...
You means that I need to become a programmor in advance?:) Mar 30, 2022

Hi
I do not want you to present the details on how to use Autohotkeys in combination with MemoQ.
It would be apprieciated if the basic workflow could be indicated in some way.

Tomás Cano Binder, BA, CT wrote:

Renquan Yang wrote:
Could some details on how to work with MemoQ in combination with Autohotkey be disclosed? The version of my MemoQ is 9.4.8.

Unfortunately it would take me a very long time to explain how to use Autohotkey in general, especially because we would have to begin with how to make a simple computer programme/script. In any case, Autohotkey is totally independent from memoQ, and simply runs on Windows. Whatever you can basically type with the keyboard (like shortcuts, text, etc.) you can do with Autohotkey.


 
Tomás Cano Binder, BA, CT
Tomás Cano Binder, BA, CT  Identity Verified
Spain
Local time: 15:18
Member (2005)
English to Spanish
+ ...
A simple example of Autohotkey Mar 30, 2022

Renquan Yang wrote:
I do not want you to present the details on how to use Autohotkeys in combination with MemoQ.
It would be apprieciated if the basic workflow could be indicated in some way.

Well, all I can say about this is that you would need to learn to write code that would look like this (this script reacts to when you press Shift+2 in the keyboard and writes a different character depending on the state of a variable I set with another little script). Using Autohotkey to execute Find+Replace operations in memoQ would look very similar. This is why I say that one would need at least some scripting/programming skills to use Autohotkey. There are other tools out there that allow you to record what you write and then edit the code to match your needs more precisely or make it more useful.
___Ejemplo Autohorkey


 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 16:18
English to Russian
Obviously you have to if you want to Mar 30, 2022

If you want to watch evening news on your coffee machine, you have to be an engineer in electronics. Similarly, if you want a program to do what it is not designed to do out of the box, then yes, you have to become a programmer. However it is a little bit easier with Autohotkey: you don't need to make scripts by yourself. Most of them are already available on the internet and you merely have to find them.

Tomás Cano Binder, BA, CT
Dan Lucas
 
Renquan Yang
Renquan Yang  Identity Verified
China
Member (2007)
English to Chinese
+ ...
Thank for all of you:) Mar 30, 2022

Thank for all of you:)
I decide to solve the issue for I know that the issue has been solved by others and I just need to find the way to reach it.
Best regards

Stepan Konev wrote:

If you want to watch evening news on your coffee machine, you have to be an engineer in electronics. Similarly, if you want a program to do what it is not designed to do out of the box, then yes, you have to become a programmer. However it is a little bit easier with Autohotkey: you don't need to make scripts by yourself. Most of them are already available on the internet and you merely have to find them.


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 15:18
Member (2006)
English to Afrikaans
+ ...
@Dan etc. Mar 31, 2022

Dan Lucas wrote:
If MemoQ .xliff files are essentially text (XML) files like the .xliff files used by Trados, you might consider doing a find and replace on those files directly.

In fact, this is a common misconception about MemoQ. MemoQ "files" are not XLIFF files. MemoQ doesn't have any files. MemoQ runs entirely off of a database.

If you want to, you can export your work to e.g. an XLIFF file (in this case, the MemoQ XLIFF format, which is a standard XLIFF file, which is what you're probably referring to), but that is the same menu that you'd use to export it to RTF for editing as a table in Word. And then when you're done editing that file, you can't simply put it somewhere in a folder and hope that MemoQ would "find" it (like Trados does) -- no, you have to import it back into MemoQ, using the import menu (the same menu that you'd use to import e.g. an RTF table).

So if the OP is going to work on actual files, he might as well work on RTF files that he can run a Microsoft Word macro on.

Stepan Konev wrote:
You can batch replace in all files per project.

Yes, and the phrase here is "per project". There is no way to edit multiple projects simultaneously in MemoQ. To my dismay, when some clients do not send e.g. ten files in one project but ten files as one file per project, even if the files are related. Arrrggghhhh. And opening and closing projects isn't quick.

But if I understand the OP correctly, he wants to do multiple find/replaces (e.g., say, 20 or 30 or 50) across all of the projects in his list.


[Edited at 2022-03-31 08:05 GMT]


John Barber
 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 15:18
Member (2006)
English to Afrikaans
+ ...
Batch replace in MemoQ Mar 31, 2022

Stepan Konev wrote:
You can batch replace in all files per project.

Sorry, I googled for this, but I could not find it. How does one do "batch replace" in MemoQ?

Or, did you simply mean "replace across multiple files simultaneously"?

find replace memoq
https://docs.memoq.com/current/en/Places/advanced-find-and-replace.html


 
Dan Lucas
Dan Lucas  Identity Verified
United Kingdom
Local time: 14:18
Member (2014)
Japanese to English
I'd still go for XLIFF Mar 31, 2022

Samuel Murray wrote:
In fact, this is a common misconception about MemoQ. MemoQ "files" are not XLIFF files. MemoQ doesn't have any files. MemoQ runs entirely off of a database.

Thank you for that clarification Samuel. I have checked the only two MemoQ projects I have done and I can't find an XLIFF file anywhere, so I don't know where I got that idea from. Perhaps the client sent me one? I found XML and other files, but none I would be inclined to edit directly.

So if the OP is going to work on actual files, he might as well work on RTF files that he can run a Microsoft Word macro on.

If the process of generating the files RTF and XLIFF takes roughly the same amount of time and effort, then given a choice between an RTF/DOCX file or a text file (XLIFF), I would take the latter every time. Ceteris paribus, use the tool optimized for the task in question.

Word VBA is powerful but also very slow compared to almost anything, including grep utilities. It also tends to get complicated unless you're familiar with it and use it often. I always end up fighting Word's object model even when I want to do something that should be simple, such as stepping through all the text in a document. I'm a bit handier with Excel's VBA, but even so I no longer use it daily as I did a decade ago, and one forgets the important little details over time.

Either way, sounds like it's going to be a multi-step process for the OP, unfortunately. May still be worth it, however.

Regards,
Dan


 
Pages in topic:   [1 2] >


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Can you record a find-and-replace macro in MemoQ?






CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »
Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »