Advertisement
shinemic

fsc_trim.vbs

Jun 4th, 2023
1,798
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Explicit
  2.  
  3. Dim imageMagickHome     ' ImageMagick 安装目录
  4. Dim imageMagickOption   ' ImageMagick 使用选项
  5. Dim oShell
  6.  
  7. imageMagickHome = "H:\Softs\UtilityPrograms\ImageMagick-7.1.1-11\"
  8. imageMagickOption = " -trim "
  9.  
  10. ' 可以执行 cmd 的对象
  11. Set oShell = CreateObject("WScript.Shell")
  12.  
  13. ' 必要地停顿(单位:毫秒)
  14. WScript.Sleep 2000
  15.  
  16. ' 执行图像操作(mogrify 可原地修改文件)
  17. oShell.Run imageMagickHome & "mogrify.exe" & imageMagickOption & WScript.Arguments.Unnamed(0), 0, True
  18.  
  19. ' 必要地停顿(单位:毫秒)
  20. WScript.Sleep 1000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement