Pregunta:
¿Cómo puedo abrir un símbolo del sistema en la carpeta actual con un atajo de teclado en Windows 7?
¿Hay alguna forma de implementar esto?
Creo que Autohotkey podría hacer esto, pero no sé cómo.
Respuesta:
Utilice este método abreviado de teclado: Mayús + Menú , W , Entrar
-
Shift + Menú (alternativamente, Shift + F10 ), (abre el menú extendido del botón derecho en la carpeta actual)
-
W (selecciona "Abrir ventana de comandos aquí"),
- Enter (activa la selección; requerido ya que "Nuevo" también se puede seleccionar con W )
La tecla Menú se refiere a la tecla especial introducida por Microsoft, generalmente a la derecha de la tecla Win derecha.
Este acceso directo está disponible en una instalación predeterminada de Windows (7) sin ningún software de terceros.
La forma AHK. Solo necesitas presionar Win + C (o como quieras definirlo):
SetTitleMatchMode RegEx
return
; Stuff to do when Windows Explorer is open
;
#IfWinActive ahk_class ExploreWClass|CabinetWClass
; create new text file
;
#t::Send !fwt
; open 'cmd' in the current directory
;
#c::
OpenCmdInCurrent()
return
#IfWinActive
; Opens the command shell 'cmd' in the directory browsed in Explorer.
; Note: expecting to be run when the active window is Explorer.
;
OpenCmdInCurrent()
{
; This is required to get the full path of the file from the address bar
WinGetText, full_path, A
; Split on newline (`n)
StringSplit, word_array, full_path, `n
; Find and take the element from the array that contains address
Loop, %word_array0%
{
IfInString, word_array%A_Index%, Address
{
full_path := word_array%A_Index%
break
}
}
; strip to bare address
full_path := RegExReplace(full_path, "^Address: ", "")
; Just in case - remove all carriage returns (`r)
StringReplace, full_path, full_path, `r, , all
IfInString full_path, \
{
Run, cmd /K cd /D "%full_path%"
}
else
{
Run, cmd /K cd /D "C:\ "
}
}
Como beneficio adicional, el script anterior también crea un nuevo archivo de texto con este atajo: Win + T
Crédito a: Eli Bendersky