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

在使用Everything时会自动复制文件路径 #84

Closed
zYeoman opened this issue Sep 8, 2017 · 14 comments
Closed

在使用Everything时会自动复制文件路径 #84

zYeoman opened this issue Sep 8, 2017 · 14 comments

Comments

@zYeoman
Copy link

zYeoman commented Sep 8, 2017

应该是实现时候方便用来预览?但是这样会覆盖掉之前剪贴板内的内容,有些时候会很麻烦。

看了一下,代码还在TODO 😂

@xupefei
Copy link
Member

xupefei commented Oct 1, 2017

现在的 Everything 只有这一种获取路径的办法。备份还原剪贴板也不是完美的,玩意你在还没还原的时候粘贴了怎么办。

@zYeoman
Copy link
Author

zYeoman commented Oct 10, 2017

可以有关掉它的选项么?因为作为Everything重度用户经常有复制一段内容要粘贴到别的地方的时候直接用Everything查找打开然后粘贴这样的流程,这样直接覆盖了剪贴板会很烦。

可以在按空格预览的一瞬间备份剪贴板然后获取路径然后还原的吧?貌似现在的实现是直要在Everything中移动了就会自动复制。。。

或者提供一个命令行调用的方式,我可以用Autohotkey之类的工具实现Everything甚至其他地方的空格预览

@xupefei
Copy link
Member

xupefei commented Oct 10, 2017 via email

@Cologler
Copy link
Contributor

用 spy++ 可以看到 everything 的列表类名是 SysListView32

picpick-20171027-213402-001

stackoverflow 上看起来有人已经试着从 SysListView32 获取 item 并成功了。

@xupefei
Copy link
Member

xupefei commented Oct 30, 2017

我不确定这个方法是否可用,因为 Everything 的窗口是经过 UAC 提权的。
有空了我先试一试。

@xupefei xupefei added this to the 0.3.2 milestone Oct 30, 2017
@xupefei
Copy link
Member

xupefei commented Nov 4, 2017

我试了一下,结论是这个方法不行,因为 Path 列不一定会被显示出来。
@zYeoman 上面提到的 AHK 自己写脚本其实只能用剪切板,因为 Everything 的确没提供靠谱的获得当前文件的办法。

下下个版本里我会提供一个开关选项。

@xupefei xupefei modified the milestones: 0.3.2, Future Nov 4, 2017
@Cologler
Copy link
Contributor

Cologler commented Nov 8, 2017

我 mail 了 everything 作者,他这样答复我:

There is no specific API do this in Everything. I'll have to look into making one for Everything 1.5..
Everything does emulate a SysListView32 for the result list.

If you remotely allocate memory in the Everything process (VirtualAllocEx) you can use LVM_GETITEMTEXT to read the name and path to build the full path and filename of the focused item in Everything.
Use ReadProcessMemory to copy the listview text outside the Everything.exe process.

https://stackoverflow.com/questions/12679518/win32-getting-listview-control-content-from-another-application

@Cologler
Copy link
Contributor

Cologler commented Nov 8, 2017

看起来 1.5 版本应该方便些了。

@xupefei
Copy link
Member

xupefei commented Nov 8, 2017

VirtualAllocEx 的确是个办法。我试试看。

@Cologler
Copy link
Contributor

Cologler commented Nov 9, 2017

@xupefei 不幸的是,Path 列一定要显示出来才能通过 VirtualAllocEx 获取……所以还是等 1.5 版本吧……

@sxul
Copy link

sxul commented Nov 16, 2017

@Cologler 为啥不显示Path列QAQ

@foundkey
Copy link

可以配合使用剪切板管理软件,暂时规避剪切板呗覆盖的问题的。
我目前使用Ditto(http://ditto-cp.sourceforge.net/)。

@mmqmzk
Copy link

mmqmzk commented Jan 3, 2019

发现一个曲线方法, Everything的"浏览路径"可以自定义命令和快捷键, 打开Everything -> 工具 -> 选项 -> 常规 -> 上下文菜单 -> 浏览路径, 把命令改成$exec("path to QuickLook\QuickLook.exe" "%1"), 再在快捷键里面设置浏览路径的快捷键为空格以外的键, 就可以了. 这个方法不会覆盖剪贴板. 但是不能用空格, 以及会占用"浏览路径"命令.

@kaikaiiiiiii
Copy link

不光是按空格会复制路径,按回车也会复制路径。希望至少能把按回车时的复制路径去掉。执行前肯定不必再预览了。

@rabelux rabelux closed this as completed Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants