Convert Windows paths in clipboard

Tue Nov 19 2019 00:00:00 GMT+0000 (Coordinated Universal Time)

This AutoHotkey script will look for Windows paths (eg. D:\) in your clipboard, and replace the backslashes with forward slashes.

Download

#Persistent
OnClipboardChange("ClipChanged")
return

ClipChanged(Type) {
    if not (DllCall("IsClipboardFormatAvailable", "Uint", 1) OR DllCall("IsClipboardFormatAvailable", "Uint", 13))
    {
        return
    }

    pos := RegExMatch(clipboard, "^\w:\\.*$")
    if (pos == 0) {
        return
    }

       clipboard := RegExReplace(clipboard, "\\", "/")
       TrayTip %A_ScriptName%, Replaced backslashes of path in clipboard
}
Who?
What?
My personal portfolio of things I come up with when I'm bored.