Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #c::
- SelectedFiles := Explorer_GetSelection()
- Loop, parse, selectedFiles, `n
- {
- newLoc := A_LoopField
- charAtRight =
- discardedLetters = g
- Loop
- {
- StringTrimRight, newLoc, newLoc, 1
- StringRight, charAtRight, newLoc, 1
- discardedLetters := charAtRight . discardedLetters
- if (charAtRight = "\") {
- newLoc := newLoc . "crushed"
- FileCreateDir %newloc%
- newLoc := newLoc . discardedLetters
- break
- }
- }
- RunWait %comspec% /c "E:\PROGRA~1\pngcrush\pngcrush.exe -brute "%A_LoopField%" "%newloc%""
- TrayTip PNG File Crushed, A new file has been created at %newLoc%
- }
- SetWorkingDir %A_MyDocuments%AHK Scripts
- Return
Advertisement
Add Comment
Please, Sign In to add comment