option explicit ' TestBin ' ' ' This is a script for Directory Opus. ' See http://www.gpsoft.com.au/DScripts/redirect.asp?page=scripts for development information. ' ' ' ' Called by Directory Opus to initialize the script Function OnInit(initData) initData.name = "TestBin" initData.desc = "Updates the recycle bin button" initData.copyright = "goselito on 01/09/2014" initData.version = "1.2" initData.default_enable = True End Function ' Called when a new Lister is opened Function OnActivateLister(ActivateListerData) Const RECYCLE_BIN = &Ha& Dim objShell Set objShell = CreateObject("Shell.Application") Dim objFolder Set objFolder = objShell.Namespace(RECYCLE_BIN) If objFolder.Items.Count > 0 Then Call DOpus.vars.Set "Script.RecycleButton", "isFull" Else Call DOpus.vars.Delete "Script.RecycleButton" End If End Function