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

Here you can discuss about your favorite plug-in.
User avatar
rattle
Posts: 23
Joined: Sat 02 Sep, 2017 18:58
Been thanked: 8 times

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

Post 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.
Last edited by rattle on Fri 15 Jun, 2018 21:54, edited 3 times in total.
User avatar
John Doe
Бюрократ
Posts: 13801
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 72 times
Been thanked: 425 times
Contact:

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

Post 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.
User avatar
rattle
Posts: 23
Joined: Sat 02 Sep, 2017 18:58
Been thanked: 8 times

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

Post 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.
User avatar
HaRT
Moderator
Posts: 10806
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 220 times
Been thanked: 357 times

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

Post by HaRT »

rattle wrote: Thu 03 May, 2018 16:11 forward commands to an active far session
SSH server within FAR? :)
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

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

Post 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.
User avatar
rattle
Posts: 23
Joined: Sat 02 Sep, 2017 18:58
Been thanked: 8 times

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

Post 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.
User avatar
HaRT
Moderator
Posts: 10806
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 220 times
Been thanked: 357 times

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

Post by HaRT »

rattle wrote: Fri 04 May, 2018 00:23 a "client" executable
PuTTY
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
rattle
Posts: 23
Joined: Sat 02 Sep, 2017 18:58
Been thanked: 8 times

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

Post 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.
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

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

Post 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.
User avatar
rattle
Posts: 23
Joined: Sat 02 Sep, 2017 18:58
Been thanked: 8 times

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

Post 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.
User avatar
HaRT
Moderator
Posts: 10806
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 220 times
Been thanked: 357 times

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

Post 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.
Last edited by HaRT on Sun 10 Jun, 2018 00:27, edited 1 time in total.
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
rattle
Posts: 23
Joined: Sat 02 Sep, 2017 18:58
Been thanked: 8 times

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

Post 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.
fml2
Posts: 534
Joined: Mon 09 Jul, 2012 22:10
Has thanked: 2 times
Been thanked: 8 times

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

Post by fml2 »

A solution to a very similar problem (if I've understood it correctly) was also devised here: viewtopic.php?p=127345#p127345
User avatar
John Doe
Бюрократ
Posts: 13801
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 72 times
Been thanked: 425 times
Contact:

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

Post 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)
Post Reply

Return to “General Plug-In Discussions”