This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IsFolderEx = function (Item) { | |
return Item.IsFolder; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sha = new ActiveXObject("Shell.Application"); | |
var sw = sha.Windows(); | |
for (var i = 0; i < sw.Count; ++i) { | |
var x = sw.item(i); | |
if (x && x.Document) { | |
var w = x.Document.parentWindow; | |
if (w && w.te && w.te.Data) { | |
var FV = w.GetFolderView(); | |
WScript.Echo(FV.FolderItem.Path); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FV.Navigate(FV.History, SBSP_NEWBROWSER); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const FolderItem = FV.FolderItem; | |
if (api.GetAttributesOf(FolderItem, SFGAO_CANRENAME)) { | |
const s = api.GetDisplayNameOf(FolderItem, SHGDN_FOREDITING | SHGDN_INFOLDER); | |
InputDialog(FolderItem.Path, s, function (r) { | |
if (/[\\\/:,;\*\?"<>\|]/.test(r)) { | |
MessageBox(api.LoadString(hShell32, 4109), null, MB_ICONSTOP | MB_OK); | |
return; | |
} | |
if ("string" === typeof r && s != r) { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Ctrl.GetFocusedItem < Ctrl.ItemCount(SVGIO_ALLVIEW) - 1) { | |
return false; | |
} | |
wsh.SendKeys("{HOME}"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Ctrl.GetFocusedItem) { | |
return false; | |
} | |
wsh.SendKeys("{END}"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TC = FV.Parent; | |
for (let i = 0; i < TC.length; i++) { | |
NavigateFV(Sync.SwitchPane.NextFV(TC[i]), TC[i].History, SBSP_NEWBROWSER); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const FV = GetFolderView(Ctrl, pt); | |
FV.Refresh() | |
const item = Sync.FolderSettings.Get(FV); | |
if (item) { | |
const s = item.text || item.textContent; | |
if (s) { | |
Exec(FV, s, item.getAttribute("Type"), null); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const currentPath = api.GetDisplayNameOf(FV, SHGDN_FORPARSING); | |
InputDialog("New Folder", "", function (r) { | |
if (r) { | |
let path = r.replace(/^\s+/, ""); | |
if (!/^[A-Z]:\\|^\\/i.test(path)) { | |
path = BuildPath(currentPath, path); | |
} | |
fso.CreateFolder(path); | |
} | |
}); |
NewerOlder