AutoIT IMVU Desktop Screenshot Cleaner 2 posts

OP Sat May 14, 2016 4:09 pm
User avatar
Administrator
Legendary Family Member
  • Gender: Male
  • Posts: 6285
  • Joined: Jun, 2010
  • Advertisements: 45
  • Karma: 368
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
Sat May 14, 2016 11:22 pm
User avatar
Site Moderator
Legendary Family Member
  • Gender: Male
  • Posts: 712
  • Joined: Mar, 2015
  • Advertisements: 2
  • Karma: 200
awsome work @ D.M thanks :D

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