Мой текущий каталог
c:\projects2016\[projectname].
Я хочу перейти к
c:\projects2014\[projectname]
с одним щелчком мыши или сочетанием клавиш. Есть идеи?
Мой текущий каталог
c:\projects2016\[projectname].
Я хочу перейти к
c:\projects2014\[projectname]
с одним щелчком мыши или сочетанием клавиш. Есть идеи?
Одно нажатие + сочетание клавиш:
; ########## AutoHotKey symbols: ##########
; ########## ! - Alt; ^ - Ctrl; + - Shift; # - Win ##########
; ########## Shift + Win + p = +#p (order doesn't matter) ##########
+#p::
; Select all
SendInput, ^a
; Copy the select text to the Clipboard.
SendInput, ^c
; Wait for the Clipboard to fill.
ClipWait
; Perform the RegEx find and replace operation,
; where "\projects2016\" is the whole-word we want to replace.
; (backslashes need to be escaped)
haystack := Clipboard
needle := "\\projects2016\\"
replacement := "\projects2014\"
Clipboard := RegExReplace(haystack, needle, replacement)
ClipWait
; Send (paste) the contents of the new Clipboard.
SendInput, %Clipboard%
; Automatically confirm / change to the new dir
SendInput, {Enter}
return
c:\projects2016\[projectname] , щелкните путь к папке.Вы будете автоматически перенаправлены в вашу папку c:\projects2014\[projectname] . Если вам нужно сохранить содержимое буфера обмена, вам необходимо сначала присвоить его переменной, а затем вставить его в буфер обмена в конце скрипта.