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: 18
Joined: Sat 02 Sep, 2017 18:58

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

Post by rattle » Thu 03 May, 2018 15:13

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: 11988
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 27 times
Been thanked: 136 times

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

Post by John Doe » Thu 03 May, 2018 15:17

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: 18
Joined: Sat 02 Sep, 2017 18:58

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

Post by rattle » Thu 03 May, 2018 16:11

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: 8510
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 74 times
Been thanked: 136 times

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

Post by HaRT » Thu 03 May, 2018 16:53

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: 5008
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 4 times
Been thanked: 167 times

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

Post by DrKnS » Thu 03 May, 2018 19:00

rattle wrote:
Thu 03 May, 2018 16:11
I'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: 18
Joined: Sat 02 Sep, 2017 18:58

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

Post by rattle » Fri 04 May, 2018 00:23

DrKnS wrote:
Thu 03 May, 2018 19:00
rattle wrote:
Thu 03 May, 2018 16:11
I'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: 8510
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 74 times
Been thanked: 136 times

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

Post by HaRT » Fri 04 May, 2018 02:45

rattle wrote:
Fri 04 May, 2018 00:23
a "client" executable
PuTTY
Фар есть инструмент, а не нянька. © 2009 DrKnS

User avatar
rattle
Posts: 18
Joined: Sat 02 Sep, 2017 18:58

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

Post by rattle » Sat 09 Jun, 2018 22:49

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: 5008
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 4 times
Been thanked: 167 times

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

Post by DrKnS » 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.

User avatar
rattle
Posts: 18
Joined: Sat 02 Sep, 2017 18:58

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

Post by rattle » Sun 10 Jun, 2018 00:12

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: 8510
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 74 times
Been thanked: 136 times

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

Post by HaRT » Sun 10 Jun, 2018 00:25

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: 18
Joined: Sat 02 Sep, 2017 18:58

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

Post by rattle » Sun 10 Jun, 2018 01:01

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: 516
Joined: Mon 09 Jul, 2012 22:10
Has thanked: 1 time
Been thanked: 7 times

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

Post by fml2 » Thu 14 Jun, 2018 23:35

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: 11988
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 27 times
Been thanked: 136 times

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

Post by John Doe » Fri 15 Jun, 2018 08:51

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)


User avatar
HaRT
Moderator
Posts: 8510
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 74 times
Been thanked: 136 times

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

Post by HaRT » Fri 15 Jun, 2018 21:02

rattle wrote:
Fri 15 Jun, 2018 20:59
Thanks, now it worked perfectly: https://plugring.farmanager.com/plugin.php?pid=975&l=en
Great! Can you please add the link to the announcement?
Фар есть инструмент, а не нянька. © 2009 DrKnS

Post Reply

Return to “General Plug-In Discussions”