Hello,
I want to implement is my FS plugin command "Reread" called by file item on panel (called in FsExecuteFile).
Because I don't need to reread sctuctures on every Ctrl+R press.
1. How can I run Reread on plugin opening? In what function may I run it (in FsFindFirst?)?
2. How can I set that after this Reread - TC rereads file panel?
Question: Reread FS file panel
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50421
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Sorry, you can't - it's up to the user to press Ctrl+R or F2. What you can do is add a pseudo file called <reread> or so, which will return a redirect to the same directory.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Ok, I found out how to do it: just to call RereadPanel(MainWin) from FsExecuteFile
(MainWin is parameter of FsExecuteFile):
(MainWin is parameter of FsExecuteFile):
Code: Select all
procedure RereadPanel(hWnd: THandle);
const
EM_DISPLAYBAND = WM_USER+51;
cm_RereadSource = 540;
begin
Sleep(200);
SendMessage(hWnd, EM_DISPLAYBAND, cm_RereadSource, 0);
Sleep(200);
end;
- ghisler(Author)
- Site Admin
- Posts: 50421
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
No, I meant the following:
The returned path must be the current path (without the name of the file called <reread>).c) If the file is a (symbolic) link, set RemoteName to the location to which the link points (including the full plugin path), and return FS_EXEC_SYMLINK. Total Commander will then switch to that directory. You can also switch to a directory on the local harddisk! To do this, return a path starting either with a drive letter, or an UNC location (\\server\share). The maximum allowed length of such a path is MAX_PATH-1 = 259 characters!
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com