[RESOLVED / ALTERED] Windows Explorer ignores sending Backspace to it and doubles its process when started \
Posted: 13 Jan 2023 12:51
I wrote this script [as the first step] to get access to Recycle Bin system folder
It works- i.e. it opens window of Window Explorer; but with a caveat, as it also opens second window with system location This PC. Being there I can manually press Backspace and end up in the Desktop folder with focus placed on Recycle Bin folder - which is exactly what I need
But the next part of my intended macro script simulating the above does not work. And that is because
is ignored. And thus it is futile to add the pivotal line
which holds the whole purpose for this shebang: I need to simulate pressing of CTRL+Z on the Recycle Bin folder in order to un-delete the last item or items sent to oblivion
And then finally I would also need to somehow close this particular Window Explorer window
I tried using variants
and
which are listed here https://learn.microsoft.com/en-us/previ ... 3(v=vs.84)] but to no avail. I also have noticed that the line
is apparently somewhat unnecessary and can be completely omitted
And thus - to sum up:
#1] is unable to push Backspace to Windows Explorer showing the content of Recycle Bin
#2] opens unnecessary second window of Window Explorer showing the content of This PC
#3] lacks commands to close the recently opened Window Explorer window
Please help me
Code: Select all
cd C:\Windows
start explorer.exe
%SendKeys% {TAB}{TAB}{TAB}{ENTER}
"%userprofile%\Desktop\Recycle Bin.lnk"
But the next part of my intended macro script simulating the above does not work. And that is because
Code: Select all
%SendKeys% {BACKSPACE}
Code: Select all
%SendKeys% ^Z
And then finally I would also need to somehow close this particular Window Explorer window
I tried using variants
Code: Select all
%SendKeys% {BS}
Code: Select all
%SendKeys% {BKSP}
Code: Select all
%SendKeys% {TAB}{TAB}{TAB}{ENTER}
And thus - to sum up:
Code: Select all
cd C:\Windows
start explorer.exe
"%userprofile%\Desktop\Recycle Bin.lnk"
%SendKeys% {BACKSPACE}
%SendKeys% ^Z
#2] opens unnecessary second window of Window Explorer showing the content of This PC
#3] lacks commands to close the recently opened Window Explorer window
Please help me