Welcome to the IDM Forum. This forum is meant as a user-to-user support mechanism where users can share knowledge and tips for all IDM software.
Since these forums are user-to-user based, IDM does not regularly read or reply to the posts in this forum. For problem reports, suggestions, or feature requests, you must email us directly. Our trained technical support staff answers most inquiries within 30 minutes.

/*! Only the 2 files should be open when running this macro or the 2 files
are the top most files in the history of last active files. Additionally
file B must have the focus when starting the macro. !*/
InsertMode
ColumnModeOff
HexOff
UnixReOff
// Copy whole content of file B into user clipboard 9.
Clipboard 9
SelectAll
Copy
/*! Change the focus to the window of file A and paste at top of this file
the content of file B. !*/
NextWindow
Top
Paste
/*! Insert as separator between these 2 lists a new line starting with
a character which surely does not exist at start of any other line
in file A or B. !*/
IfColNumGt 1
"
#
"
Else
"#
"
EndIf
/*! Set the cursor back to top of the file (= top of file content from
file B and run a loop until the cursor reaches the inserted line
with the special character at start of the line. This previously
inserted separator line must be deleted before exiting the loop. !*/
Top
Loop
IfCharIs "#"
DeleteLine
ExitLoop
EndIf
/*! Select everything from start of the line to first |. That is the part
of the line from file B which should be searched for in file A. This
string is copied to user clipboard 9. !*/
Find RegExp "%?+|"
Copy
EndSelect
/*! Remove current selection and select the second part of the line which
is the replace string. The cursor is not at end of the current line
from file B. !*/
Key LEFT ARROW
StartSelect
Key END
/*! Search now for the all strings in user clipboard 9 (first line part)
and replace them with the selected string (second line part). !*/
Find "|^c"
Replace All "^s|"
/*! Delete that line from file B. The cursor is then automatically at
start of the next line. So the number of lines decreases by 1 on
every run of the loop. !*/
DeleteLine
EndLoop
// Clear user clipboard 9 to free RAM and switch back to Windows clipboard.
ClearClipboard
Clipboard 0


Find "|^c"
Replace All "^s|"

