Hi everyone. I'm trying to recreate a portable recycle bin app, like the one here: https://sourceforge.net/projects/ibin/
So in Windows, you can't use the Recycle Bin on most USB flash drives or SD cards. When you press the "DELETE" key, it permanently deletes the file. What the program iBin does, is essentially detect if Windows has gotten a "DELETE FILE" command and intercepts this action. iBin then moves the file/folder to its own "portable recycle bin" folder for temporary storage. Then using iBin's recyle-bin interface, you can choose to either permanently delete the items (empty trash) or restore items to their previous directories.
So I'm attempting to recreate this functionality in Fusion. I've created a frame which allows me to drag-n-drop files into the frame window, and it moves them to its "bin" folder. It stores the original location in an INI file. So the "delete and restore" functions work fine.
But the only way I was able to make this work is by physically clicking, dragging, and dropping the files into the Fusion application window.
Ideally, I would like to be able to just press the "DELETE" key on my keyboard, in a normal Windows Explorer window, and have the Fusion app detect this action, and redirect the file for its own purposes. But I can't figure out how to accomplish that.
iBin was created with scripting language called AutoHotKey. AutoHotKey has a development function called "WindowSpy" which basically lets you get some basic information about the currently focused window. This allows you to setup hotkeys and functions for special programs. For example, it can detect when "notepad.exe" is running, and get info from your Notepad window.
So anyone got any ideas? My app would need to be able to do these things:
- Detect DELETE key or DELETE button for files/folders in normal explorer windows.
- Retrieve the PATH of the files that are selected (for moving)
- Cancel/override the default Windows "Are you sure you want to permanently delete this file?" message box.
The rest of it I have already figured out, and as a drag-n-drop recycle bin, it works great.