Rubbish - System Tray Recycle Bin

Post your working scripts, libraries and tools
User avatar
TheDewd
Posts: 982
Joined: 19 Dec 2013, 11:16
Location: USA

Rubbish - System Tray Recycle Bin

17 Jan 2017, 10:58

Image

Introduction
Rubbish is an application that creates a tray icon to represent the Windows recycle bin. The basic functions of the desktop recycle bin icon can be accessed via Rubbish from your system tray area.

Please provide any feedback or suggestions to help improve the application.

Revision History

Code: [Select all] [Expand] [Download] (Changelog.txt)GeSHi © Codebox Plus


Downloads
The most recent release of Rubbish
Rubbish_Rev4_2017-09-05.zip (25.23 KB) - September 05, 2017

These files are outdated and kept for archival purposes only. Please refer to the most recent releases for the latest additions and improvements.
Rubbish_Rev3_2017-01-23.zip (10.85 KB) - January 23, 2017
Rubbish_Rev2_2017-01-21.zip (10.21 KB) - January 21, 2017
Rubbish_Rev1_2017-01-17.zip (6.64 KB) - January 17, 2017

*All downloads are stored on Dropbox

Screenshots
Rubbish - Settings (General)
Image

Rubbish - Settings (Advanced)
Image

Rubbish - Settings (Appearance)
Image

Rubbish - Settings (About)
Image

Rubbish - Tray Icon (TrayTip)
Image

Rubbish - Tray Icon (Context Menu)
Image

* Screenshots may not reflect all current features of the latest release.
Last edited by TheDewd on 06 Sep 2017, 07:59, edited 15 times in total.
User avatar
davebrny
Posts: 70
Joined: 05 Dec 2016, 06:26

Re: Rubbish - System Tray Recycle Bin

17 Jan 2017, 12:17

nice looking rubbish :D

i wouldnt be in a mad rush to be trying out things with hex in them though... it could be anything in there right? ...or maybe im just being overly paranoid.


in case you dont know, you can combine those 3 icons into one .ico file and then switch between them using numbers. i cant remember the name of the program i used to do it now, but maybe somebody else knows more about how its done

Code: [Select all] [Download] GeSHi © Codebox Plus

menu, tray, icon, % icon_path, 1
menu, tray, icon, % icon_path, 2
User avatar
TheDewd
Posts: 982
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Rubbish - System Tray Recycle Bin

17 Jan 2017, 12:41

davebrny wrote:i wouldnt be in a mad rush to be trying out things with hex in them...
That's understandable. I just liked the idea of having everything in a single script without having to include external resource files or packaging the files into a compressed archive. I will keep your concerns in mind for any future revisions.

davebrny wrote:in case you dont know, you can combine those 3 icons into one .ico file
Yes, I'm aware of this. This script was inspired by similar programs such as MiniBin (https://e-sushi.github.io/), and during the initial development of the script I decided to keep the icon format the same. MiniBin theme icons are compatible with this script for full or empty. I will look into allowing multi icons as well.
gwarble
Posts: 232
Joined: 30 Sep 2013, 15:01

Re: Rubbish - System Tray Recycle Bin

17 Jan 2017, 19:42

Cool idea... in case you want to remove the recycle bin from the desktop when using this instead it can be done from gpedit.msc > administrative... > control panel > desktop > "remove recycle bin from desktop" > enabled
How to do that programmatically i don't know but it would be a cool feature of Rubbish
EitherMouse - Multiple mice, individual settings . . . . www.EitherMouse.com . . . . forum . . . .
User avatar
moefr01
Posts: 62
Joined: 25 Nov 2015, 09:01
Location: Germany

Re: Rubbish - System Tray Recycle Bin

21 Jan 2017, 06:10

really nice work... thanks a lot lot TheDewd.

I am using Win10Pro 64bit and I've noticed the following abnormality:
- when using a second (or more?) harddrives/partitions internally, deleting files on it: no reaction to the bin-icons (full/empty)

I've tested this issue with the Windows-system related desktop-trashcan enabled and these desktopicons are changing as expected.
Seems working only with the system-partition... any hint?

cheers
moefr01
User avatar
TheDewd
Posts: 982
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Rubbish - System Tray Recycle Bin

21 Jan 2017, 12:42

moefr01 wrote:...Seems working only with the system-partition... any hint?

I updated the script. Please try the newest version and let me know if this fixed your issue! Thank you!
User avatar
moefr01
Posts: 62
Joined: 25 Nov 2015, 09:01
Location: Germany

Re: Rubbish - System Tray Recycle Bin

21 Jan 2017, 14:15

TheDewd wrote:
moefr01 wrote:...Seems working only with the system-partition... any hint?

I updated the script. Please try the newest version and let me know if this fixed your issue! Thank you!


thanks for the update... following occurs after testing intensively:

1. deleting files/folders on several harddisc-partitions (even USB-drives) works now -> traysymbol changed to full-icon :thumbup:
2. empty recycle bin... from rubbish-menu doesn't start any recycling action -> traysymbol didn't change (desktopicon-recycling per rightclick works) :(
3. changing the language.ini file esp. 38=settings to 38=Einstellungen has no effect after choosing :(
User avatar
moefr01
Posts: 62
Joined: 25 Nov 2015, 09:01
Location: Germany

Re: Rubbish - System Tray Recycle Bin

21 Jan 2017, 17:02

got the bugs... :crazy:

line 323: } Else If (ItemName = "Empty Recycle Bin...") {
line 385: HR := DllCall("Shell32.dll\SHQueryRecycleBin", "Str", "", (A_PtrSize = 8) ? "Ptr" : "UInt", &SHQUERYRBINFO, "UInt")
line 392: return DllCall("Shell32.dll\SHEmptyRecycleBin", "UInt", 0, "Str", "", "UInt", Flags)

explanations:
line 323: didn't resolve MenuHandler regarding ItemName without "..."
line 385/392: rootpath-string should be null to query/empty recycle bins on all drives
(see: https://msdn.microsoft.com/de-de/librar ... 60(v=vs.85).aspx)

moefr01 :wave:
User avatar
moefr01
Posts: 62
Joined: 25 Nov 2015, 09:01
Location: Germany

Re: Rubbish - System Tray Recycle Bin

21 Jan 2017, 17:32

P.S.:
size and item-counting failed... here's the corrected code:

replace line 62 - 80 with

RBQuery:
/*
TotalSize := 0
TotalNumItems := 0

DriveGet, FixedDrives, List, Fixed

Loop, Parse, FixedDrives
{
SHQueryRecycleBin(A_LoopField ":\", Size, NumItems)
TotalSize += Size
TotalNumItems += NumItems
}
*/
SHQueryRecycleBin("C:\", TotalSize, TotalNumItems)
Menu, Tray, % (!TotalNumItems ? "Disable" : "Enable"), 2&
Menu, Tray, Tip, % StrFormatByteSize(TotalSize) "`n" TotalNumItems " " (TotalNumItems = 1 ? Lang32 : Lang33)
Menu, Tray, Icon, % (TotalNumItems ? FileExist(IconFull) ? IconFull : dIconFull : FileExist(IconEmpty) ? IconEmpty : dIconEmpty)
return


_______________________________________________________________________________________________________________
moefr01 :wave:
User avatar
TheDewd
Posts: 982
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Rubbish - System Tray Recycle Bin

21 Jan 2017, 20:43

@moefr01,

I replaced the download with an updated version fixing issues you detected.

I don't understand your issue with "size and item-counting failed" though. You are commenting out the fix for counting files on the non-system partitions.

Can you please elaborate more on this issue? I don't have extra partitions to test, so your input is valuable. Thanks! :D
User avatar
moefr01
Posts: 62
Joined: 25 Nov 2015, 09:01
Location: Germany

Re: Rubbish - System Tray Recycle Bin

22 Jan 2017, 02:53

:bravo: @TheDewd ...works now as expected! :bravo:

size and item-counting failed issue regards only your previously release: it double-counted the recyclebin items, so I tried to recode as in your first release.. that worked fine temporarily.

Now I've tested your last release without any issues, all settings including changes for the languagetext and icons work great... PERFECT!!! :thumbup:
In addition: extra partitions and USB-drives are fully supported

thanks a lot for your time, code and efforts...
:wave: moefr01
User avatar
TheDewd
Posts: 982
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Rubbish - System Tray Recycle Bin

23 Jan 2017, 15:01

Rubbish has been updated to Revision 3 (2017-01-23).

I made a few minor UI tweaks, added an option to request confirmation to exit the application, and added a feature to automatically empty the recycle bin based on a defined rule.

Please let me know if anyone encounters any issues.
User avatar
TheDewd
Posts: 982
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Rubbish - System Tray Recycle Bin

05 Sep 2017, 16:00

Rubbish has been updated to Revision 4 (2017-09-05).

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 7 guests