I'm trying to figure out how to loop this little script, so that it shows the amount of the HDD's space left in real time. And also to run an external program (that will notify me in several ways) when the HDD's space becomes too low, for example when there's only 10 GB left.
Here's a little script i just compiled, right now it just shows the space left on Drive C:
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
$Free = DriveSpaceFree("C:\")
$Free = $Free / 1024
$Free = Round($Free,1)
$hGUI = GUICreate("", 60, 15, -1, -1, $WS_POPUP)
GUISetBkColor(0x000000, $hGUI)
$OutputText = GUICtrlCreateLabel($Free & " GB", -1, 0)
GUICtrlSetColor($OutputText, 0xFFFFFFF)
GUISetState()
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
I tried to loop it with the (While 1 / WEnd) function, it loops but it runs the script with multiple instances.
It would be also great if this script only shows up on the tray notification area and not on the taskbar.