Chrome settings/password 使用 Autohotkey 的快捷方式
Chrome settings/password shortcut with Autohotkey
我正在尝试使用 autohotkey(我是它的菜鸟)做一个快捷方式,以便在我打开 chrome 时转到 chrome://settings/password/。
运行 命令仅适用于 URL,例如:
Run, http://whosebug.com
所以我尝试了这个脚本,但它对我来说很粗糙:
;myScript:
#IfWinActive, ahk_class Chrome_WidgetWin_1
^q::Send, ^t chrome://settings/passwords/ {enter}
#IfWinActive
有一些方法可以做得更好吗?
逐步尝试:
;myScript:
#IfWinActive, ahk_class Chrome_WidgetWin_1
^q::
Send, ^t
Sleep 500
; replace "title" with the exact title of the new window (tab)
; WinWait, title
; IfWinNotActive, title, ,WinActivate, title
; WinWaitActive, title
SendInput, chrome://settings/ ; SendInput is faster in sending text
Sleep 500
Send, {enter}
Sleep 500
; replace "title" with the exact title of the new window (tab)
; WinWait, title
; IfWinNotActive, title, ,WinActivate, title
; WinWaitActive, title
Send, {Tab 2}
Sleep 500
Send, {enter}
return
#IfWinActive
我通常会加入一些循环来解决旧硬件的延迟问题,并在满足条件时中断。
您可以使用以下命令触发 Chrome 中的密码框,目前绑定到 F4。
F4::
{
WinActivate, ahk_class Chrome_WidgetWin_1
Loop {
IfWinActive, ahk_class Chrome_WidgetWin_1
{
break
}
}
Send, ^t
Loop {
IfWinActive, New Tab - Google Chrome
{
break
}
}
Send, chrome://settings/passwords{enter}
}
return
我正在尝试使用 autohotkey(我是它的菜鸟)做一个快捷方式,以便在我打开 chrome 时转到 chrome://settings/password/。
运行 命令仅适用于 URL,例如:
Run, http://whosebug.com
所以我尝试了这个脚本,但它对我来说很粗糙:
;myScript:
#IfWinActive, ahk_class Chrome_WidgetWin_1
^q::Send, ^t chrome://settings/passwords/ {enter}
#IfWinActive
有一些方法可以做得更好吗?
逐步尝试:
;myScript:
#IfWinActive, ahk_class Chrome_WidgetWin_1
^q::
Send, ^t
Sleep 500
; replace "title" with the exact title of the new window (tab)
; WinWait, title
; IfWinNotActive, title, ,WinActivate, title
; WinWaitActive, title
SendInput, chrome://settings/ ; SendInput is faster in sending text
Sleep 500
Send, {enter}
Sleep 500
; replace "title" with the exact title of the new window (tab)
; WinWait, title
; IfWinNotActive, title, ,WinActivate, title
; WinWaitActive, title
Send, {Tab 2}
Sleep 500
Send, {enter}
return
#IfWinActive
我通常会加入一些循环来解决旧硬件的延迟问题,并在满足条件时中断。
您可以使用以下命令触发 Chrome 中的密码框,目前绑定到 F4。
F4::
{
WinActivate, ahk_class Chrome_WidgetWin_1
Loop {
IfWinActive, ahk_class Chrome_WidgetWin_1
{
break
}
}
Send, ^t
Loop {
IfWinActive, New Tab - Google Chrome
{
break
}
}
Send, chrome://settings/passwords{enter}
}
return