AutoIT IMVU Desktop Screenshot Cleaner

DataMine
by DataMine · 6 posts
8 years ago in Autoit
Posted 8 years ago · Author
This is a script for cleaning up IMVU screenshots from your desktop. It's sole purpose is to move any IMVU screenshots into their own folder for easy access. This script is really useful if you use the automatic feature of my picture taker script found HERE because it can takes lots of screenshots and fill up your desktop.


Click the download button below to download a pre compiled exe if you just want to use the script.


Image


Below is the full source code to the script if you want to make any changes or scrutinize it for anything bad:

Code
#include <Array.au3>
#include <File.au3>

;The directory to search for screenshots in
Global $workingDirectory = @DesktopDir

;The directory to move the screenshots to
Global $screenshotDirectory = @DesktopDir & "\" & "Screenshots"

;Create an array of all the PNG Images found in the working directory
$array = _FileListToArray($workingDirectory, "*.png")

;If no PNG Images were found
If @error = 4 Then
   MsgBox($MB_SYSTEMMODAL, "", "No Screenshots were found.")
   Exit
EndIf

;If the screenshot directory doesn't exist
IF Not FileExists($screenshotDirectory) Then
   ;create it
   DirCreate($screenshotDirectory)
EndIf

;Iterate through the PNG Images
For $i = 1 to $array[0]

   ;If the png name contains hiResNoBg or hiResSnapshot, assume it is an IMVU screenshot and move it
   If Not StringInStr($array[$i], "hiResNoBg") = 0 OR Not StringInStr($array[$i], "hiResSnapshot") = 0 Then
     FileMove($workingDirectory & "\" & $array[$i], $screenshotDirectory & "\" & $array[$i]);
   EndIf
Next


@Don Von Alpha Dom
Posted 1 year ago
thank you man great work!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT