Page 1 of 1

Rubbish - System Tray Recycle Bin

Posted: 17 Jan 2017, 10:58
by TheDewd
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

Revision 4 (2017-09-05)
* Changed implementation of language & translation
* Optimized functions
* Bug fixes
* Minor UI Tweaks

Revision 3 (2017-01-23)
* Minor UI tweaks
* Added option to confirm exiting the application
* Added Automatic Recycle feature

Revision 2 (2017-01-21)
* Updated to work with all fixed drives
* Added option to hide the desktop recycle bin icon
* Improved the user interface
* Enabled customizing the language for the entire script via INI file

Revision 1 (2017-01-17)
* Initial release
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.

Re: Rubbish - System Tray Recycle Bin

Posted: 17 Jan 2017, 11:15
by guest3456
:thumbsup:

Re: Rubbish - System Tray Recycle Bin

Posted: 17 Jan 2017, 12:17
by davebrny
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

menu, tray, icon, % icon_path, 1
menu, tray, icon, % icon_path, 2

Re: Rubbish - System Tray Recycle Bin

Posted: 17 Jan 2017, 12:41
by TheDewd
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.

Re: Rubbish - System Tray Recycle Bin

Posted: 17 Jan 2017, 19:42
by gwarble
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

Re: Rubbish - System Tray Recycle Bin

Posted: 21 Jan 2017, 06:10
by moefr01
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

Re: Rubbish - System Tray Recycle Bin

Posted: 21 Jan 2017, 12:42
by TheDewd
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!

Re: Rubbish - System Tray Recycle Bin

Posted: 21 Jan 2017, 14:15
by moefr01
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 :(

Re: Rubbish - System Tray Recycle Bin

Posted: 21 Jan 2017, 17:02
by moefr01
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 ... s.85).aspx)

moefr01 :wave:

Re: Rubbish - System Tray Recycle Bin

Posted: 21 Jan 2017, 17:32
by moefr01
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:

Re: Rubbish - System Tray Recycle Bin

Posted: 21 Jan 2017, 20:43
by TheDewd
@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

Re: Rubbish - System Tray Recycle Bin

Posted: 22 Jan 2017, 02:53
by moefr01
: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

Re: Rubbish - System Tray Recycle Bin

Posted: 23 Jan 2017, 15:01
by TheDewd
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.

Re: Rubbish - System Tray Recycle Bin

Posted: 05 Sep 2017, 16:00
by TheDewd
Rubbish has been updated to Revision 4 (2017-09-05).