FireGestures.generatePopup(event,
[
{ label: "记事本",
oncommand: "LaunchApp('C:\\\\WINDOWS\\\\system32\\\\notepad.exe');" },
{ label: "计算器", oncommand:
"LaunchApp('C:\\\\WINDOWS\\\\system32\\\\calc.exe');" },
{ label:
"画图", oncommand:
"LaunchApp('C:\\\\WINDOWS\\\\system32\\\\mspaint.exe');" },
{
label: "截图", oncommand:
"LaunchApp('C:\\\\WINDOWS\\\\system32\\\\SnippingTool.exe');" },
{
label: "---------", oncommand: "" },
{ label: "freedom 代理",
oncommand: "LaunchApp('D:\\\\phus-goagent-a3b308c\\\\local\\\\goagent.exe');" },
{ label: "图片",
oncommand: "LaunchApp('F:\\\\图片\\\\FF');" },
{
label: "下载", oncommand: "LaunchApp('D:\\\\0下载');" },
{ label:
"我的电脑", oncommand:
"LaunchApp('::{20D04FE0-3AEA-1069-A2D8-08002B30309D}');" },
{
label: "---------", oncommand: "" },
{ label: "重新载入", oncommand:
"FireGestures.API_runFromCommand('Browser:Reload');" },
{ label:
"附加组件", oncommand: "FireGestures.API_runFromCommand('Tools:Addons');" },
{ label: "错误控制台", oncommand:
"FireGestures.API_runFromCommand('FireGestures:ErrorConsole');" },
{ label: "显示书签侧边栏", oncommand:
"FireGestures.API_runFromCommand('FireGestures:BookmarksSidebar');" },
{ label: "显示历史侧边栏", oncommand:
"FireGestures.API_runFromCommand('FireGestures:HistorySidebar');" },
{ label: "FireGestures - 选项", oncommand:
"FireGestures.API_runFromCommand('FireGestures:Preferences');" },
{ label: "重启Firefox", oncommand:
"FireGestures.API_runFromCommand('FireGestures:RestartApp');" },
]
);
LaunchApp = function(aPath){
var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsILocalFile);
file.initWithPath(aPath);
file.launch();
}
FireGestures.API_runFromName = function(aName) {
var mappingsArray = this._gestureMappings.getMappingsArray();
for (var i = 0; i < mappingsArray.length; i++) {
if(mappingsArray[1] == aName)
(new Function("event", mappingsArray[2]))(event);
}
}
FireGestures.API_runFromDirection = function(aDirection) {
var command = this._gestureMappings.getCommandForDirection(aDirection);
if (command.type == this._gestureMappings.TYPE_SCRIPT)
(new Function("event", command.value))(event);
else
this._performAction(event, command.value);
}
FireGestures.API_runFromCommand = function(aCommand) {
this._performAction(event, aCommand);
}
这个鼠标手势的脚本很好用 |