AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

iBin portable recylce bin done in AHK
Goto page 1, 2  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
First Toy Lab



Joined: 15 Nov 2009
Posts: 21
Location: London, UK

PostPosted: Tue Dec 22, 2009 11:43 pm    Post subject: iBin portable recylce bin done in AHK Reply with quote

What happens if you erase your files direct from a removable device, like a memory stick?

Question

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.

Idea



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
View user's profile Send private message MSN Messenger
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Wed Dec 23, 2009 1:14 pm    Post subject: Reply with quote

How does it detect when file is about to be deleted ?
_________________
Back to top
View user's profile Send private message
First Toy Lab



Joined: 15 Nov 2009
Posts: 21
Location: London, UK

PostPosted: Wed Dec 23, 2009 8:26 pm    Post subject: Reply with quote

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.

Razz
Back to top
View user's profile Send private message MSN Messenger
SoggyDog



Joined: 02 May 2006
Posts: 783
Location: Greeley, CO

PostPosted: Wed Dec 23, 2009 8:34 pm    Post subject: Reply with quote

Looks good;
Has potential;
Without Source should be in Utilities & Resources;
Smoke one for me, please.
_________________

SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Fry



Joined: 01 Nov 2007
Posts: 885

PostPosted: Wed Dec 23, 2009 8:41 pm    Post subject: Reply with quote

Nice script.

Soggydog, its fine where it is.
The Scripts & Functions does not say needs source.
Back to top
View user's profile Send private message
SoggyDog



Joined: 02 May 2006
Posts: 783
Location: Greeley, CO

PostPosted: Wed Dec 23, 2009 9:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Fry



Joined: 01 Nov 2007
Posts: 885

PostPosted: Wed Dec 23, 2009 9:38 pm    Post subject: Reply with quote

"This section is for sharing your favorite scripts, functions, and AutoHotkey-specific software."
Back to top
View user's profile Send private message
SoggyDog



Joined: 02 May 2006
Posts: 783
Location: Greeley, CO

PostPosted: Wed Dec 23, 2009 9:41 pm    Post subject: Reply with quote

SoggyDog wrote:
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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Fry



Joined: 01 Nov 2007
Posts: 885

PostPosted: Wed Dec 23, 2009 9:44 pm    Post subject: Reply with quote

If you'd like to act that way, fine.
Back to top
View user's profile Send private message
First Toy Lab



Joined: 15 Nov 2009
Posts: 21
Location: London, UK

PostPosted: Wed Dec 23, 2009 9:53 pm    Post subject: Reply with quote

SoggyDog wrote:
Looks good;
Has potential;
Without Source should be in Utilities & Resources;
Smoke one for me, please.


Did.

Cool

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
View user's profile Send private message MSN Messenger
First Toy Lab



Joined: 15 Nov 2009
Posts: 21
Location: London, UK

PostPosted: Wed Dec 23, 2009 10:00 pm    Post subject: Reply with quote

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.


Laughing

Guys, again? This is another post which someone become angry with the fact I did bring my toy to them play.

Laughing

I was writing the script post while you both were in this debate.

Laughing

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
View user's profile Send private message MSN Messenger
sinkfaze



Joined: 18 Mar 2008
Posts: 5044
Location: the tunnel(?=light)

PostPosted: Wed Dec 23, 2009 10:48 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
SoggyDog



Joined: 02 May 2006
Posts: 783
Location: Greeley, CO

PostPosted: Wed Dec 23, 2009 10:59 pm    Post subject: Reply with quote

First Toy Lab wrote:
Did.

Cool

Very Happy Thanks.
_________________

SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Fri Dec 25, 2009 2:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
First Toy Lab



Joined: 15 Nov 2009
Posts: 21
Location: London, UK

PostPosted: Sun Dec 27, 2009 6:53 pm    Post subject: Reply with quote

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

Arrow https://sourceforge.net/projects/ibin/
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group