Open/Save Dialog synchronizer
Moderators: Hacker, petermad, Stefan2, white
Open/Save Dialog synchronizer
Hi,
I would like to develop a totalcommander plugin which is able to "synchronize" all systemwide open/save dialog path with the current directory in total commander. I mean if the current directory is c:\foo\bar on the selected panel/tab, and I open a opendialog from a different application, the current directory of the dialog will be c:\foo\bar as well. I hope it's clear what I want.
So my question is: Is it possible to somehow query the actual directory from totalcommander, or bind an event to every directory change?
thanks
I would like to develop a totalcommander plugin which is able to "synchronize" all systemwide open/save dialog path with the current directory in total commander. I mean if the current directory is c:\foo\bar on the selected panel/tab, and I open a opendialog from a different application, the current directory of the dialog will be c:\foo\bar as well. I hope it's clear what I want.
So my question is: Is it possible to somehow query the actual directory from totalcommander, or bind an event to every directory change?
thanks
Hello zeroflag,
Some of us are using a simple AHK script to paste the active path from TC into the dialogbox, thus changing the directory. Not sure if the necessary changes for TC 7.50 have already been performed on the script.
HTH
Roman
Some of us are using a simple AHK script to paste the active path from TC into the dialogbox, thus changing the directory. Not sure if the necessary changes for TC 7.50 have already been performed on the script.
HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Current path may be copied e.g. from status bar or from panel titles. Following code copies text from status bar (path will have trailing '>' characher that you need to erase then):
(this will find right panel with right child panel; should work for TC 7.5 and earlier too)
Status bar always contains path of current panel.
Code: Select all
HWND tcwnd=FindWindow("TTOTAL_CMD", 0);
char buf2[1024]; int k2=0;
HWND cmdpanel=0;
while (1) {
if (!(cmdpanel=FindWindowEx(tcwnd, cmdpanel, "TMyPanel", ""))) break;
if (FindWindowEx(cmdpanel, 0, "TMyComboBox", "") || FindWindowEx(cmdpanel, 0, "TComboBox", "")) {
HWND pathpanel=FindWindowEx(cmdpanel, 0, "TMyPanel", 0);
k2=GetWindowText(pathpanel, buf2, sizeof(buf2));
if (k2&&buf2[k2-1]=='>') break; else k2=0;
}
}
if (k2) buf2[--k2]=0;
Status bar always contains path of current panel.
Last edited by MVV on 2010-01-13, 15:32 UTC, edited 1 time in total.
zeroflag,
Roman
I do not know for sure but I do not think so, no.I suspect there is no way to bind an event to the directory change from any type of plugin, right?
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
TC is not very extensible, no automation API and win message system great to push info but nothing great to get info from TC.zeroflag wrote:,
I suspect there is no way to bind an event to the directory change from any type of plugin, right?
Instead of getting in touch every time TC change a folder, you should get the current folder by your own !
If you want to get informed that Tabs change, you can continuously parse wincmd.ini or get current folder as MVV shown and build a TC spy Daemon yourself.
FavMenu (see AHK/TC forum) is already doing a lot of good stuff about fileDialog automation, you should get a eye on it.
Last edited by nsp on 2010-01-11, 12:52 UTC, edited 1 time in total.
hey zeroflag:
see here if this is what you need:
http://ghisler.ch/board/viewtopic.php?p=193866#193866
see here if this is what you need:
http://ghisler.ch/board/viewtopic.php?p=193866#193866
- robinsiebler
- Senior Member
- Posts: 460
- Joined: 2003-03-05, 21:04 UTC