pepanee Posted August 9, 2017 Report Share Posted August 9, 2017 Hello, I'll try to keep this simple. I want to run the "Undo Delete" command that's in File Explorer while I have a program running. Is there a way to do that? Currently the macro that I have is: 1) to minimize everything 2) move the mouse to the top-left pixel of the screen 3) right-click & text type: u [to Undo Delete] 4) then restore the program I have that was working in Is there a way to keep the program running on the screen & have Macro Express run the "Undo Delete" command without anything changing visually on-screen? Thanks Quote Link to comment Share on other sites More sharing options...
Samrae Posted August 9, 2017 Report Share Posted August 9, 2017 No. Macro Express does not have a built-in undelete file command and in order for File Explorer to perform the undelete it must have focus. The only thing I would consider changing is instead of 1) minimize everything I would use the Window Activate command to give File Explorer focus but leave all the other windows alone. Quote Link to comment Share on other sites More sharing options...
pepanee Posted August 9, 2017 Author Report Share Posted August 9, 2017 Thanks for the reply. Yea I tried thinking of other alternate solutions to this, and I did think of your idea. The thing about Focusing File Explorer is rather messy too, because I would have to open File Explorer and wait for it to load (which isn't that long, but you know how when you open it, it fades in), and after that I actually tried sending the File Explorer window to the bottom-right section of the screen (to hide the File Explorer window from showing up on screen). The only thing is that once I open File Explorer, it shows up in the middle of the screen for a split milli-second, then gets thrown off to the bottom right corner. Also another bug I encountered after having the window sent to that corner is that, sometimes the Undo Delete worked and sometimes it didn't. So that method is also a bit "messy" for the visual on screen. I asked on the TenForums site to see if anyone knows how to create a shortcut [while in File Explorer, Right Click > New > Shortcut] for a command that can execute the "Undo" function. So something along the lines of: "C:\Windows\explorer.exe" [and an argument to run the Undo function in Explorer] Yet I haven't gotten a solution for that. You see, if I can figure out a shortcut that I can make that does this, that would be so much more convenient, since I can set up a macro to execute that file easily! Does anyone here know how to do that? Anyways, thanks for your help! Quote Link to comment Share on other sites More sharing options...
acantor Posted August 10, 2017 Report Share Posted August 10, 2017 This may be the easiest way to undo: Text Type (Simulate Keystrokes): <CONTROL>z Quote Link to comment Share on other sites More sharing options...
pepanee Posted August 10, 2017 Author Report Share Posted August 10, 2017 ... doing "Text Type (Simulate Keystrokes): <CONTROL>z" while my app is focused does not Undo Delete... Quote Link to comment Share on other sites More sharing options...
acantor Posted August 10, 2017 Report Share Posted August 10, 2017 If you delete something while in the application, what happens if you immediately press Ctrl + z? Does "Undo delete" appear as a command in a menu or on a ribbon? If yes, which menu/ribbon? Quote Link to comment Share on other sites More sharing options...
pepanee Posted August 11, 2017 Author Report Share Posted August 11, 2017 The application is a Picture Viewer. I download a collection of wallpaper images. I go through the pictures and press the Delete button to the pictures that I don't want to keep. The Delete button deletes a picture, yet there is no Undo Delete function within the application. So suppose I delete a picture accidentally, and I want to recover that picture, I cannot press CTRL+Z in the application, because that is not supported in there. Yet I have a Macro Express macro that when I press Backspace (specifically in that application), it will minimize everything, it will send the mouse to the top left corner of the Desktop, it will Right-Click the mouse, Text Type U [for undo], and then restore the picture viewer application. I want to avoid all that from happening, and only to undo the delete while the application is open on the screen (not minimized). I hope this post makes what I'm trying to say, clearer. Quote Link to comment Share on other sites More sharing options...
rberq Posted August 11, 2017 Report Share Posted August 11, 2017 I have noticed if you do a copy or move, then right clicking gives you the option to undo that copy or move -- it does not revert to the the last delete. If you undo a delete then right click, you get the option to re-do the delete (or copy, or move). So it is context-sensitive to your last action, and could quickly degenerate into who-knows-what if you are not watching closely. Perfect is the enemy of good. At this point you are good. Be satisfied. Quote Link to comment Share on other sites More sharing options...
pepanee Posted August 11, 2017 Author Report Share Posted August 11, 2017 Whenever I'm going through the pictures and deleting the ones I don't want, Right clicking on the Desktop, for example, will always have the Undo Delete option, because there is nothing else that's running in the background that could interfere with this process. I am only asking for a method that could run the Undo command through Macro Express without going through the process of the set up that I posted earlier. Or in other words, how can I do Ctrl+Z without having File Explorer focused? Quote Link to comment Share on other sites More sharing options...
Samrae Posted August 11, 2017 Report Share Posted August 11, 2017 When you press something like Ctrl+z it goes to the window that has focus. If Macro Express types Ctrl+z then it too goes to the window that has focus. In order to have a macro undo the delete you need to the macro set focus to File Explorer. Does the Windows Recycle Bin do what you need? If you accidentally delete something you can use the Recycle bin to recover it. Quote Link to comment Share on other sites More sharing options...
pepanee Posted August 11, 2017 Author Report Share Posted August 11, 2017 Yes, File Explorer works to recover any file that I deleted. The thing is that I want to avoid a macro to set focus to File Explorer whenever I need to recover a deleted file. Is there no other work-around for that? Quote Link to comment Share on other sites More sharing options...
pepanee Posted August 14, 2017 Author Report Share Posted August 14, 2017 So a random idea popped in my head! I said, what if I set focus to some "hidden" window that's part of the operating system, Control + Z, refocus my image program, press the left key to go to previous image (the one that I just recovered)? That idea seems to be working! (If it stops working, which it shouldn't, then I'll post back on that). But I will post a screen shot of that macro. The bottom part was my original method stated earlier. (I'm holding on to it for now just in case) Quote Link to comment Share on other sites More sharing options...
rberq Posted August 14, 2017 Report Share Posted August 14, 2017 Very clever! Thanks for posting this. So, are you saying this works without the Program Manager screen temporarily replacing JPEGView? Or do you mean Program Manager flashes up and is replaced by JPEGView so quickly that it is no longer a problem? Quote Link to comment Share on other sites More sharing options...
pepanee Posted August 14, 2017 Author Report Share Posted August 14, 2017 Hi, thanks! And you're welcome. =) Yes, this works without having Program Manager flash on the screen at all, which is exactly what I was hoping for! It is some Operating System window that is 'hidden'. So when I run the macro, all I see on the screen is the Image Viewer program (JPEGView) become inactive [the top bar of the program becomes gray], then less than a second later, JPEGView becomes the active window again, and the Left Arrow key is pressed to go to the previous image (which is the image that was just recovered when the Ctrl+Z command was run). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.