| View previous topic :: View next topic |
| Author |
Message |
First Toy Lab
Joined: 15 Nov 2009 Posts: 21 Location: London, UK
|
Posted: Tue Dec 22, 2009 11:43 pm Post subject: iBin portable recylce bin done in AHK |
|
|
What happens if you erase your files direct from a removable device, like a memory stick?
Most of the time its do not go to the recycle bin. And if you regret later, is a complex job to recover the files... The solution is a portable program which detect when the file is deleted to move it to a special container: iBin.
iBin
Download here:
http://www.autohotkey.net/~FirstToyLab/project_iBin_download.htm _________________
http://www.autohotkey.net/~FirstToyLab/
Last edited by First Toy Lab on Wed Dec 30, 2009 4:11 pm; edited 5 times in total |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Wed Dec 23, 2009 1:14 pm Post subject: |
|
|
How does it detect when file is about to be deleted ? _________________
 |
|
| Back to top |
|
 |
First Toy Lab
Joined: 15 Nov 2009 Posts: 21 Location: London, UK
|
Posted: Wed Dec 23, 2009 8:26 pm Post subject: |
|
|
| majkinetor wrote: | | How does it detect when file is about to be deleted ? |
It detect the window used to confirm the file delete action. But the iBin can be used with hotkeys, which skip this process.
Today I discovered in my friends computer that the iBin 1.0a is not detecting the Windows Vista delete action. I need to enhance the routine.
I will smoke a spliff now and I will be back in few minutes to share part of the script here.
 |
|
| Back to top |
|
 |
SoggyDog
Joined: 02 May 2006 Posts: 783 Location: Greeley, CO
|
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 885
|
Posted: Wed Dec 23, 2009 8:41 pm Post subject: |
|
|
Nice script.
Soggydog, its fine where it is.
The Scripts & Functions does not say needs source. |
|
| Back to top |
|
 |
SoggyDog
Joined: 02 May 2006 Posts: 783 Location: Greeley, CO
|
Posted: Wed Dec 23, 2009 9:09 pm Post subject: |
|
|
| Fry wrote: | ...its fine where it is.
The Scripts & Functions does not say needs source. |
I see no script;
I see no function;
I see an executable.
We've had this debate before;
I'm not going to pursue it. _________________
SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played." |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 885
|
Posted: Wed Dec 23, 2009 9:38 pm Post subject: |
|
|
| "This section is for sharing your favorite scripts, functions, and AutoHotkey-specific software." |
|
| Back to top |
|
 |
SoggyDog
Joined: 02 May 2006 Posts: 783 Location: Greeley, CO
|
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 885
|
Posted: Wed Dec 23, 2009 9:44 pm Post subject: |
|
|
| If you'd like to act that way, fine. |
|
| Back to top |
|
 |
First Toy Lab
Joined: 15 Nov 2009 Posts: 21 Location: London, UK
|
Posted: Wed Dec 23, 2009 9:53 pm Post subject: |
|
|
| SoggyDog wrote: | Looks good;
Has potential;
Without Source should be in Utilities & Resources;
Smoke one for me, please. |
Did.
This is the script used to detect the window delete action, which is the best way to know when the user is really erasing files/folders. Rely on wait the user press a Del key become a big and complex issue if this process is skip with a menu command, like Delete from the right-click menu. Because any delete action by the user always must come from a selection of file/folders, it is possible to use the Autohotkey commands to trick the system, send the selection to the clipboard, verify the content and trigger the right response.
This a trick used before by the creator of C.A.F.E. software, today eXpresso.
I used three ways to detect the window delete action to avoid the LOOP routine overuse the system processor.
The two features I wish improve:
- Capture the title of the windows delete action from a single selection and a multiple selection.
- Set a pre-defined size values of the windows delete action based on the operate system.
Last edited by First Toy Lab on Mon Dec 28, 2009 5:06 pm; edited 1 time in total |
|
| Back to top |
|
 |
First Toy Lab
Joined: 15 Nov 2009 Posts: 21 Location: London, UK
|
Posted: Wed Dec 23, 2009 10:00 pm Post subject: |
|
|
| SoggyDog wrote: | | Fry wrote: | ...its fine where it is.
The Scripts & Functions does not say needs source. |
I see no script;
I see no function;
I see an executable.
We've had this debate before;
I'm not going to pursue it. |
Guys, again? This is another post which someone become angry with the fact I did bring my toy to them play.
I was writing the script post while you both were in this debate.
I not post all the script because big part is GUI commands and LOOP parsing. It's 1405 lines now!
note: trust me, I post in the General Chat, by the forum administrator move to here. |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5044 Location: the tunnel(?=light)
|
Posted: Wed Dec 23, 2009 10:48 pm Post subject: |
|
|
| First Toy Lab wrote: | | note: trust me, I post in the General Chat, by the forum administrator move to here. |
I did notice this post was in General Chat last night, wonder why the mod didn't at least tag that they moved it...
At any rate, I'll give this a look over the holiday weekend. _________________ Try Quick Search for Autohotkey or see the tutorial for newbies. |
|
| Back to top |
|
 |
SoggyDog
Joined: 02 May 2006 Posts: 783 Location: Greeley, CO
|
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Fri Dec 25, 2009 2:27 pm Post subject: |
|
|
| Quote: | | It detect the window used to confirm the file delete action. But the iBin can be used with hotkeys, which skip this process. |
So this can't be used with other file managers then default one - Explorer. _________________
 |
|
| Back to top |
|
 |
First Toy Lab
Joined: 15 Nov 2009 Posts: 21 Location: London, UK
|
Posted: Sun Dec 27, 2009 6:53 pm Post subject: |
|
|
| majkinetor wrote: | | Quote: | | It detect the window used to confirm the file delete action. But the iBin can be used with hotkeys, which skip this process. |
So this can't be used with other file managers then default one - Explorer. |
Now the script works correctly in Windows Vista. I made drastic changes in the window capturing script. The best way to detect the right window is match different titles and sizes. Every version of the Windows operate system change the sizes the confirmation window, but follow a pattern. I used to capture three different situations of delete action: one file selection, multiple selection and one folder selection.
The routine to detect the window pop-up was adapted to work from any window where the user can use the operate system commands to delete a file/folder (right-click menu, DEL key, button command). What is matter is the window which pop-up to match the pre-defined parameters. That’s why is important allow the user capture the window delete action details.
This script works in any file manager with the classNN equivalent to SysListView321. That means more than 80% of the world wide users of Windows operate system.
I still do not know how works in Windows 7 or even Windows 2000.
Support iBin project in
https://sourceforge.net/projects/ibin/ |
|
| Back to top |
|
 |
|