I found some strange behavior, but it's unclear is it a bug of XYplorer or is it a bug AutoHokey. In Widows Explorer it works correctly though, that's why I tend to think it is some issue with XYplorer.
Below you could see the script which will diff two files of your choice with DiffMerge utility. To test it, just select two files (in the same folder) and then press Win+D.
For some reason, SendMode, Input doesn't properly work in combination with #d. If you remove SendMode, Input or if you change hotkey to something different, e.g. #a -- everything works fine. The DiffMerge window will be opened above XYplorer window (correct behavior).
But if you keep both SendMode, Input and #d -- then DiffMerge window will be opened under XYplorer window.
Why?
Code: Select all
#SingleInstance, Force
SendMode, Input
ClipWaitTime := 2
#d::
ClipboardSaved := ClipboardAll
Clipboard := ""
Send, ^c
ClipWait, %ClipWaitTime%
If ErrorLevel
Return
Clipboard := RegExReplace(Clipboard, "(.*)\r\n(.*)", """$1"" ""$2""")
DiffMergePath := A_ProgramFiles . "\SourceGear\Common\DiffMerge\sgdm.exe"
Run, %DiffMergePath% %Clipboard%
Clipboard := ClipboardSaved
Return
XYplorer Beta Club