Compeare loaded PaperFolder with its actual file?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
eil
Posts: 1590
Joined: 13 Jan 2011 19:44

Compeare loaded PaperFolder with its actual file?

Post by eil »

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

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: Compeare loaded PaperFolder with its actual file?

Post by highend »

If the current pane content is not 100% identical to it's pf?

Code: Select all

    if (strpos(tab("get", "name"), "paper:") == -1) { end true; }
    if (listpane(, , , <crlf>) != paperfolder(, , , "r")) {
        // Different, do whatever you want to do...
    }
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 (strlen(listpane(, , , <crlf>)) != strlen(paperfolder(, , , "r"))) {
        // Different, do whatever you want to do...
    }
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

eil
Posts: 1590
Joined: 13 Jan 2011 19:44

Re: Compeare loaded PaperFolder with its actual file?

Post by eil »

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)
Win 7 SP1 x64 100% 1366x768

Post Reply