-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phantom Auto-Refreshment / How to disable? #710
Comments
This happens if the move starts before the created folder appears, so I shifted the timing by about 2000ms. // Create a folder and move any selected items to it
const currentPath = api.GetDisplayNameOf(FV, SHGDN_FORPARSING);
const Selected = FV.SelectedItems();
const prompt = (Selected && Selected.Count) ? "Move " + Selected.Count + " item(s) to new folder" : "New Folder" ;
InputDialog(prompt, "", function (r) {
if (r) {
let path = r.replace(/^\s+/, "");
if (!/^[A-Z]:\\|^\\/i.test(path)) {
path = BuildPath(currentPath, path);
}
CreateFolder(path);
if (Selected && Selected.Count) {
const oDest = sha.NameSpace(path);
if (oDest) {
setTimeout(function(oDest, Selected) {
oDest.MoveHere(Selected, FOF_ALLOWUNDO);
}, 2000, oDest, Selected);
}
}
}
}); // Move selected items to a new folder
const currentPath = api.GetDisplayNameOf(FV, SHGDN_FORPARSING);
const Selected = FV.SelectedItems();
if (Selected && Selected.Count) {
InputDialog("Move " + Selected.Count + " item(s) to new folder", "", function (r) {
if (r) {
let path = r.replace(/^\s+/, "");
if (!/^[A-Z]:\\|^\\/i.test(path)) {
path = BuildPath(currentPath, path);
}
CreateFolder(path);
const oDest = sha.NameSpace(path);
if (oDest) {
setTimeout(function(oDest, Selected) {
oDest.MoveHere(Selected, FOF_ALLOWUNDO);
}, 2000, oDest, Selected);
}
}
});
} Regards, |
These alternatives avoid 2000ms delay, but the new folder is restricted to a sub-folder (the original and the above versions can create a folder elsewhere).
|
999ms version. // Create a folder and move any selected items to it
const currentPath = api.GetDisplayNameOf(FV, SHGDN_FORPARSING);
const Selected = FV.SelectedItems();
const prompt = (Selected && Selected.Count) ? "Move " + Selected.Count + " item(s) to new folder" : "New Folder" ;
InputDialog(prompt, "", function (r) {
if (r) {
let path = r.replace(/^\s+/, "");
if (!/^[A-Z]:\\|^\\/i.test(path)) {
path = BuildPath(currentPath, path);
}
CreateFolders(path);
if (Selected && Selected.Count) {
const oDest = sha.NameSpace(path);
if (oDest) {
setTimeout(function(oDest, Selected) {
oDest.MoveHere(Selected, FOF_ALLOWUNDO);
}, 999, oDest, Selected);
}
}
}
}); // Move selected items to a new folder
const currentPath = api.GetDisplayNameOf(FV, SHGDN_FORPARSING);
const Selected = FV.SelectedItems();
if (Selected && Selected.Count) {
InputDialog("Move " + Selected.Count + " item(s) to new folder", "", function (r) {
if (r) {
let path = r.replace(/^\s+/, "");
if (!/^[A-Z]:\\|^\\/i.test(path)) {
path = BuildPath(currentPath, path);
}
CreateFolders(path);
const oDest = sha.NameSpace(path);
if (oDest) {
setTimeout(function(oDest, Selected) {
oDest.MoveHere(Selected, FOF_ALLOWUNDO);
}, 999, oDest, Selected);
}
}
});
} Regards, |
Thank you both for the offered solutions and effort 😊 I tried both and both solutions are closest to my needs. Basically, I will combine both of your two solutions. That's settled. Excellent! 🥇 P.S. Gaku, I have two more questions; but it's not related to this - or yesterday's topics. Kind regards. |
Dear Gaku,
I noticed it last time and now when I tested it again yesterday.
Last time, I commented on it with ccfs.
I think I saw what this could be about yesterday.
When I use the grouping script some "auto-refresh" occurs.
I think I found out what it is about, and the process is like this:
Initially, I unpack the package - eg "te240206" (settings orginal)
There are three folders
I mark two folders, and run the grouping script.
Those two folders are neatly grouped into one folder (that's OK)
Arrangement as in the picture:
The next procedure is a little different, with a change to the Layout (put any one, it doesn't matter)
In this example; I created one, i.e. the first "1tab.xml"
The procedure is repeated with the maps:
There are three folders
I mark two folders, and run the grouping script.
Those two folders are neatly grouped into one folder (that's OK)
But unlike the previous one, now this phantom auto-refresh occurs.
Arrangement as in the picture:
Why is this happening?
I would like the folder that was created not to change the folder order until I manually refresh it by myself.
The thing is sometimes it's hard like before for me to keep track of what I've done.
The only thing that has changed is that I have changed the "Layout".
If there are any questions, feel free to ask me.
Best regards.
The text was updated successfully, but these errors were encountered: