From http://kongjian.baidu.com/sunch721521/blog/item/12cdd633ab47e34bac4b5f20.html
'Note :~ Represents press enter, % Represents ALT, ^ represents Ctrl, CTRL + ← represents deletion...
'Set the followingCodeCopy and paste the image to notepad, modify the image path, and save it ?. Vbs
'The image taken by a digital camera occupies a lot of space.ProgramOpen the image and save it as a result. The image effect remains unchanged but is much smaller.
'This vbs can save images in batches
'Function: Save the jpg image in the current image directory (such as E: \ graph) to a new directory (such as E: \ new_graph) to keep the image file name unchanged.
'Set Ws = Createobject ("wscript. Shell ")
'Ws. Run "mspaint zsc.jpg", 1
Dim FSO, pic_file, directory, tmpname, current_url, new_url
Set FSO = Createobject ("scripting. FileSystemObject ")
'Set the location of the file directory
Current_url = inputbox ("directory of the input file, such as D: \ floder (do not include \)")
Set Directory = FSO. getfolder (current_url)
New_url = inputbox ("Enter the saved directory, such as D :( do not include \)")
'Open the Drawing Software
Set Ws = wscript. Createobject ("wscript. Shell ")
WS. Run "C: \ windows \ system32 \ mspaint.exe", 1
Wscript. Sleep 1000
For each pic_file in directory. Files
Tmpname = lcase (pic_file.name)
WS. appactivate "paint"
Wscript. Sleep 10
'Open the file
WS. sendkeys "^ o"
Wscript. Sleep 10
WS. sendkeys current_url & "\" & tmpname
Wscript. Sleep 10
WS. sendkeys "~ "
Wscript. Sleep 10
'Save
WS. sendkeys "% Fa"
Wscript. Sleep 10
WS. sendkeys new_url & "\" & tmpname
Wscript. Sleep 10
WS. sendkeys "~ "
Wscript. Sleep 10
WS. sendkeys "Y"
Next
WS. sendkeys "% FX"