Skip to content

Instantly share code, notes, and snippets.

@tablacus
Created June 19, 2024 22:50
Show Gist options
  • Save tablacus/b49250c6f5df57e4dd7f444823750ce8 to your computer and use it in GitHub Desktop.
Save tablacus/b49250c6f5df57e4dd7f444823750ce8 to your computer and use it in GitHub Desktop.
Control from the outside scripts - Tablacus Explorer
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);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment