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

Pygin: I would like to send a list of files to "Temporary Panel" plugin #43

Open
jonisb opened this issue Oct 20, 2019 · 1 comment
Open

Comments

@jonisb
Copy link

jonisb commented Oct 20, 2019

It seems I would use MacroControl for that but I'm guessing it's not implemented yet?

I assume "far.py" has all of Far API that's implemented?

So is it possible to send a list of files to "Temporary Panel" plugin, right now via Pygin?

@alabuzhev
Copy link
Collaborator

I assume "far.py" has all of Far API that's implemented?

Not yet I'm afraid, only a small subset of it. Basically, everything in plugin.todo is not implemented yet.

This project was started as a demo of the adapters concept in Far, I implemented some of the API to show that everything works, to reveal any issues in the design etc. and planned to (maybe) continue if there's a public demand.

is it possible to send a list of files to "Temporary Panel" plugin, right now via Pygin?

You've touched a long and sad topic - sending files to Temporary Panel is a classic example of "inter-plugin communication", which was one of the main motivators for breaking changes in Far 3, but, as far as I know, is still far from perfection. I'm not aware of any proper ways of doing that (but I haven't been following this topic closely lately, please try asking on the forum, maybe there's one), but some silly workarounds are definitely possible even right now:

# First create the "filenames.temp" with the full names of the files you want to send to TmpPanel
# The implementaiton is left as an exercise to the reader

# Now "send" it:
self.ActivePanel.PanelControl(far.FileControlCommands.SetCmdLine, 0, "tmp:C:\\Path\\To\\filenames.temp")
win32api.keybd_event(0x0d, 0, 0, 0)

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