Isoraqathedh

PNGCrush

Mar 10th, 2012
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #c::
  2. SelectedFiles := Explorer_GetSelection()
  3. Loop, parse, selectedFiles, `n
  4. {
  5.     newLoc := A_LoopField
  6.     charAtRight =
  7.     discardedLetters = g
  8.     Loop
  9.     {
  10.         StringTrimRight, newLoc, newLoc, 1
  11.         StringRight, charAtRight, newLoc, 1
  12.         discardedLetters := charAtRight . discardedLetters
  13.         if (charAtRight = "\") {
  14.             newLoc := newLoc . "crushed"
  15.             FileCreateDir %newloc%
  16.             newLoc := newLoc . discardedLetters
  17.             break
  18.         }
  19.     }
  20.     RunWait %comspec% /c "E:\PROGRA~1\pngcrush\pngcrush.exe -brute "%A_LoopField%" "%newloc%""
  21.     TrayTip PNG File Crushed, A new file has been created at %newLoc%
  22. }
  23. SetWorkingDir %A_MyDocuments%AHK Scripts
  24. Return
Advertisement
Add Comment
Please, Sign In to add comment