I can confirm that
- opening a file using Explorer shell extension of UltraEdit (ue64ctmn.dll or ue32ctmn.dll) by right clicking on a file in Windows Explorer or any other application supporting the Explorer shell extensions like Total Commander and left clicking on context menu item UltraEdit as configured at Advanced - Settings or Configuration - File associations
- and with an instance of UltraEdit already running
- and with none of the options used at Advanced - Settings or Configuration - Application layout - Miscellaneous to start a new instance
results in loading the file by 32-bit UltraEdit v22.214.171.124 without executing the macro set to run once on each load of a file.
This issue is obviously a bug of 32-bit UltraEdit v126.96.36.199 and perhaps also 64-bit version (not tested by me) and former UltraEdit versions (not tested by me) which must be reported by email to IDM support to be fixed by a developer of UltraEdit in a future version.
I use neither the shell extension of UltraEdit nor running a macro on each file load and so this issue does not bother me. For that reason I don't report this issue to IDM support by email.
Please report this issue to IDM support by email.
The macro configured to run on each file load is executed if no instance of UltraEdit is already running and so the shell extension has to start a new instance of UltraEdit with the full qualified file name passed as first argument to the UltraEdit executable on starting it.
The macro can be optimized using following macro code:
Code: Select all
Find RegExp "%chk=\K.+$"
Find RegExp "%chk=\K.+\x5C(.+)\.gjf$"
Find RegExp "%chk=\K(?:.+)(?=\.chk$)"
Find RegExp "(\r?\n)[\t ]*\1\K.*$"
It includes two workarounds for the bug discussed at Error when using Perl RegEx (.*\\)
. The first one is using \x5C
instead of \\
and the second one is using $1
in replace string instead of \1
which is used in last search string on which $1
does not work. I really hope this bug is fixed in next hotfix version as it makes writing Perl regular expressions really a nightmare. Update:
And the issue was fixed with UE v188.8.131.52 released two days after writing this reply.
The macro works for files with DOS and with UNIX line endings.
There is no macro debugger like the Visual Basic macro debugger in Microsoft Office applications. So it is not possible to single step debug UltraEdit macros.
I insert command ExitMacro
into the macro at a certain position in command sequence, run the macro, verify if everything is done as expected by the macro, use File - Revert to saved
, open macro editor and move command ExitMacro
downwards in macro code, run the macro again on file, verify if everything is done as expected again up to this point in command sequence, use again File - Revert to saved
and so on until I could find out where I made the mistake or where the macro is not producing the expected result up to command ExitMacro
Very often I simply use Ctrl+Z one or more times after executing a macro to undo one modification after the other done by the macro to see the content of the file on the intermediate reformatting steps.