Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Y大,请教addmenuplus右键打开文件夹的问题 #25

Open
fishlee opened this issue Oct 12, 2015 · 2 comments
Open

Y大,请教addmenuplus右键打开文件夹的问题 #25

fishlee opened this issue Oct 12, 2015 · 2 comments

Comments

@fishlee
Copy link

fishlee commented Oct 12, 2015

Y大,_addmenu.js中page栏添加如下代码不起作用,而单独写成三个就可以,麻烦帮忙看看怎么改,多谢多谢
{ label: "Files",
tooltiptext: "左键:Profiles\n中键:Chrome\n右键:Images",
onclick : function(e) {
switch(e.button) {
case 0:
exec : "";
closeMenus(this);
break;
case 1:
exec : "\Chrome";
closeMenus(this);
break;
case 2:
exec : "\extensions\[email protected]\content";
closeMenus(this);
break;
}
}
}

@ywzhaiqi
Copy link
Owner

page({
    label: "Files",
    tooltiptext: "左键:Profiles\n中键:Chrome\n右键:Images",
    onclick: function(e) {
        var path;
        switch (e.button) {
            case 0:
                path = addMenu.handleRelativePath("\\");
                break;
            case 1:
                path = addMenu.handleRelativePath("\\Chrome");
                break;
            case 2:
                path = addMenu.handleRelativePath("\\extensions\\[email protected]\\content");
                break;
        }

        addMenu.exec('C:\\Windows\\explorer.exe', [path]);
    }
})

@fishlee fishlee closed this as completed Oct 15, 2015
@fishlee fishlee reopened this Oct 15, 2015
@fishlee
Copy link
Author

fishlee commented Oct 15, 2015

问题解决,谢谢Y大

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants