FsPlugin: reloading current directory
Moderators: Hacker, petermad, Stefan2, white
FsPlugin: reloading current directory
Hello all!
I have a little question:
I'm writing a filesystem plugin, and want to have it execute some internal action when the user "runs" a certain pseudo-file. No problem here with the FsExecuteFile function. But the action will change the directory that is currently being displayed.
Is there a way to have TC automatically reload the current directory to display the changes made during the FsExecuteFile call?
Thanks in advance for help!
I have a little question:
I'm writing a filesystem plugin, and want to have it execute some internal action when the user "runs" a certain pseudo-file. No problem here with the FsExecuteFile function. But the action will change the directory that is currently being displayed.
Is there a way to have TC automatically reload the current directory to display the changes made during the FsExecuteFile call?
Thanks in advance for help!
Gruß,
Frank
Frank
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The only way to do this is use PostMessage to send a message WM_USER+51 to TC with the cm_xxx command in WPARAM and LPARAM set to 0. The command to send is cm_RereadSource (see wincmd.inc for numeric value).Is there a way to have TC automatically reload the current directory to display the changes made during the FsExecuteFile call?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
When your item is activated, you can assume that the user is using TC, so just use GetActiveWindow().
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
In most cases it works but there still several pitfalls.When your item is activated, you can assume that the user is using TC, so just use GetActiveWindow().
1. If FS-plugin activated as result of command sent from script or another application (like TCMenu) TC may be in background.
2. There can be also unexpected popup window (ZoneAlarm, antivirus etc).
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The only problem in this case would be that there is no refresh...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
2ctiberg
Yes, that's what I suggested too to a plugin writer, but he told me that it didn't work for him. Does it work for you?
Yes, that's what I suggested too to a plugin writer, but he told me that it didn't work for him. Does it work for you?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Yes I indeed tried that as a first idea, but for me that did not work as well.ghisler(Author) wrote:[FS_EXEC_SYMLINK]
Yes, that's what I suggested too to a plugin writer, but he told me that it didn't work for him. Does it work for you?
For my purpose, it's not that much a problem if the reload fails (it's just for an "empty project" command for a burning plugin I'm writing), but maybe it would be a good idea to implement a "controlled" means to do that for a future version of the plugin interface.

Gruß,
Frank
Frank
It's gonna be a CD/DVD burning plugin that can write Data CD/DVDs, Video DVDs and Audio CDs (for now, VCD and SVCD will followLefteous wrote:2Loc2262What kind of burning plugin is that?(it's just for an "empty project" command for a burning plugin I'm writing

It'll be ready in some days, am working on the documentation ATM.

Gruß,
Frank
Frank