Compeare loaded PaperFolder with its actual file?
-
eil
- Posts: 1864
- Joined: 13 Jan 2011 19:44
Compeare loaded PaperFolder with its actual file?
I like to keep my PaperFolders in Explicit Save mode. But sometimes this leads to little inconvenience, like say i add some items, switch to other app doing stuff, and then back to XY, switching tab and losing those items, 'cause i forgot i didn't make manual save. Not a big deal and as i understand i can add some smartness with CEA on tabs switch, checking if tab is a PF. But how can i compare loaded PF tab and the actual PF file, to get to know tab's list was modified but not saved?
Win 7 SP1 x64 100% 1366x768|1900x1080
-
highend
- Posts: 14925
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Compeare loaded PaperFolder with its actual file?
If the current pane content is not 100% identical to it's pf?
If the pane content is just sorted differently this should be sufficient as well:
Code: Select all
if (strpos(tab("get", "name"), "paper:") == -1) { end true; }
if (listpane(, , , <crlf>) != paperfolder(, , , "r")) {
// Different, do whatever you want to do...
}
Code: Select all
if (strpos(tab("get", "name"), "paper:") == -1) { end true; }
if (strlen(listpane(, , , <crlf>)) != strlen(paperfolder(, , , "r"))) {
// Different, do whatever you want to do...
}
One of my scripts helped you out? Please donate via Paypal
-
eil
- Posts: 1864
- Joined: 13 Jan 2011 19:44
Re: Compeare loaded PaperFolder with its actual file?
highend thank you for code examples. For pity seem like my idea won't work, as while trying codes i understood CEA Tabs Switch makes action After one gets to another tab,
If Don reads this = how about another CEA for making action Before switching to another tab?(so one soe actions can happen in current tab and only then switch to newly selected happens)
If Don reads this = how about another CEA for making action Before switching to another tab?(so one soe actions can happen in current tab and only then switch to newly selected happens)
Win 7 SP1 x64 100% 1366x768|1900x1080
XYplorer Beta Club