Page 1 of 2

FRC: Far Remote Control — navigate to folder from an external program, e.g. Everything search

Posted: Thu 03 May, 2018 15:13
by rattle
This is my original question and how this plugin came to be:


That said, this is now the official thread for the resulting plugin FRC (Far Remote Control), source code is here:
https://github.com/huettenhain/frc

Currently, only 64bit binaries are available on the plugring because I have no 32bit testing environment. Leave a message if you are very interested in (working ;-)) 32bit binaries.
https://plugring.farmanager.com/plugin.php?pid=975&l=en

It's a very simple extension that allows external programs to issue FAR to navigate to a specific folder. I use it to integrate Everything search into FAR.

Is there any way to open a folder in an existing FAR instance from an external program?

Posted: Thu 03 May, 2018 15:17
by John Doe
rattle wrote: Thu 03 May, 2018 15:13 but I would like to interact with an already running session.
There is no such functionality in FAR.
It's possible to implement it by plugin though.

Is there any way to open a folder in an existing FAR instance from an external program?

Posted: Thu 03 May, 2018 16:11
by rattle
Thanks for the confirmation. I will wait for a little while if someone has a brilliant idea or already knows a plugin that could provide this. Otherwise, I'll look into coding something that can forward commands to an active far session.

Is there any way to open a folder in an existing FAR instance from an external program?

Posted: Thu 03 May, 2018 16:53
by HaRT
rattle wrote: Thu 03 May, 2018 16:11 forward commands to an active far session
SSH server within FAR? :)

Is there any way to open a folder in an existing FAR instance from an external program?

Posted: Thu 03 May, 2018 19:00
by DrKnS
rattle wrote: Thu 03 May, 2018 16:11I'll look into coding something that can forward commands to an active far session
The proper way to do that is to implement a plugin that would start a background thread, listen a pipe / socket / any other IPC stuff there and, when needed, post a message to the main thread via ACTL_SYNCHRO. Far will then pass that message to the plugin's ProcessSynchroEventW function where you can change current directory or do anything else you like.

Is there any way to open a folder in an existing FAR instance from an external program?

Posted: Fri 04 May, 2018 00:23
by rattle
DrKnS wrote: Thu 03 May, 2018 19:00
rattle wrote: Thu 03 May, 2018 16:11I'll look into coding something that can forward commands to an active far session
The proper way to do that is to implement a plugin that would start a background thread, listen a pipe / socket / any other IPC stuff there and, when needed, post a message to the main thread via ACTL_SYNCHRO. Far will then pass that message to the plugin's ProcessSynchroEventW function where you can change current directory or do anything else you like.
Hah, yes sorry for not being precise - that was what I was thinking of. There should in fact be two tools, a "server" plugin and a "client" executable.

Is there any way to open a folder in an existing FAR instance from an external program?

Posted: Fri 04 May, 2018 02:45
by HaRT
rattle wrote: Fri 04 May, 2018 00:23 a "client" executable
PuTTY

Is there any way to open a folder in an existing FAR instance from an external program?

Posted: Sat 09 Jun, 2018 22:49
by rattle
DrKnS wrote: Thu 03 May, 2018 19:00 The proper way to do that is to implement a plugin that would start a background thread, listen a pipe / socket / any other IPC stuff there and, when needed, post a message to the main thread via ACTL_SYNCHRO. Far will then pass that message to the plugin's ProcessSynchroEventW function where you can change current directory or do anything else you like.
I finally found the time to get this done, pretty much exactly what you suggested:

https://github.com/huettenhain/frc

Works pretty well with Everything.

Is there any way to open a folder in an existing FAR instance from an external program?

Posted: Sat 09 Jun, 2018 23:21
by DrKnS
rattle, looks nice.
FYI: far/plugin.hpp is not intended to be used directly, it's better to use plugins/common/unicode/plugin.hpp.

Also, there's a plugin to search via Everything directly from Far.

Is there any way to open a folder in an existing FAR instance from an external program?

Posted: Sun 10 Jun, 2018 00:12
by rattle
DrKnS wrote: Sat 09 Jun, 2018 23:21 rattle, looks nice.
FYI: far/plugin.hpp is not intended to be used directly, it's better to use plugins/common/unicode/plugin.hpp.

Also, there's a plugin to search via Everything directly from Far.
I will replace the plugin.hpp asap, thanks for the hint. Regarding the LiveFileSearch plugin; It's pretty great, but it sadly does not update the run count in Everything and I really want that, this is the whole reason I was looking for an easy alternative.

Is there any way to open a folder in an existing FAR instance from an external program?

Posted: Sun 10 Jun, 2018 00:25
by HaRT
rattle wrote: Sat 09 Jun, 2018 22:49 found the time to get this done
You might wish to announce your plug-in and/or register it at the PlugRing (however buggy it is).

BTW, you might edit the topic starting post so that it is the announcement, and I'd move the topic to that sub-forum.

Far Remote Control plugin (navigate to folder in FAR from an external program, such as Everything search)

Posted: Sun 10 Jun, 2018 01:01
by rattle
HaRT wrote: Sun 10 Jun, 2018 00:25 You might wish to announce your plug-in and/or register it at the PlugRing (however buggy it is).
Ok, I need help. How do I upload stuff to the plugring? I simply cannot find a way to do that :Search:
HaRT wrote: Sun 10 Jun, 2018 00:25 BTW, you might edit the topic starting post so that it is the announcement, and I'd move the topic to that sub-forum.
Done.

FRC: Far Remote Control — navigate to folder from an external program, e.g. Everything search

Posted: Thu 14 Jun, 2018 23:35
by fml2
A solution to a very similar problem (if I've understood it correctly) was also devised here: viewtopic.php?p=127345#p127345

FRC: Far Remote Control — navigate to folder from an external program, e.g. Everything search

Posted: Fri 15 Jun, 2018 08:51
by John Doe
rattle wrote: Sun 10 Jun, 2018 01:01 Ok, I need help. How do I upload stuff to the plugring? I simply cannot find a way to do that
You can try now (just added you as author at plugring)

FRC: Far Remote Control — navigate to folder from an external program, e.g. Everything search

Posted: Fri 15 Jun, 2018 20:59
by rattle