一次在Firefox中运行两个快捷命令

时间:2017-02-20 20:58:21

标签: javascript firefox command keyboard-shortcuts

我想在Firefox中推出两个快捷方式,紧接着另一个。第一个是来自Web Developer插件的自定义操作之一。第二个是简单的F5来刷新页面。有没有办法只使用一个命令或按钮或其他东西运行这两个。也许JavaScript书签可以。我真的对此一无所知,所以感谢所有的帮助!

先谢谢!

2 个答案:

答案 0 :(得分:0)

您可以使用 AutoHotKey 通过一个键盘快捷键设置多个命令。

请查看此示例以获取帮助。 (这很容易做到。)

Multiple Commands to Single Hotkey

答案 1 :(得分:0)

如果您想在Firefox中同时运行两个快捷方式命令。

您可以使用此Autohotkey脚本。

;GroupAdd, Browser, ahk_class Chrome_WidgetWin_1 ; Chrome or Iron
;GroupAdd, Browser, ahk_class IEFrame            ; Internet Explorer
GroupAdd, Browser, ahk_class MozillaWindowClass ; FireFox
;GroupAdd, Browser, ahk_class ApplicationFrameWindow ; Edge

; Click on the keyboard Ctrl+Shift+e 
; if Firefox browser is active then execute the two Shortcuts Commands.
^+e::  

; [+ = Shift]  [! = Alt]  [^ = Ctrl]  [# = Win] 
If WinActive("ahk_group Browser")
{ 
send ^+i ;The first shortcut Command = open the inspector
sleep 150
send {f5} ;The second shortcut Command = Refresh the Page in Browser
}
return

esc::exitapp