I AM QUITE NEW TO AUTOHOTKEY.
I HAVE GOT 100 IMAGE FILES. I NEED TO OPEN EACH OF THEM AND RESIZE TO 100X100 PIXELS. CAN ANYONE HELP ME TO GET A SCRIPT TO DO THE SAME USING AUTOHOTKEY.
ACTUALLY I NEED TO MAKE A PHOTO MOSAIC WITH THE RESIZED IMAGES.
MS PAIN - AUTOMATION OF REPEATED TASK
Re: MS PAIN - AUTOMATION OF REPEATED TASK
u can do it with imagemagick:
- put all ur images in a folder
- open a terminal in that folder/navigate to it
- mkdir outdir
- mogrify -path outdir -resize 100x100! * (delete !, if u wanna preserve aspect ratio)
Re: MS PAIN - AUTOMATION OF REPEATED TASK
thanks for your reply....
it helps....
but can i do the same using autohotkey scripts....? just want to learn the scripting techniques..
it helps....
but can i do the same using autohotkey scripts....? just want to learn the scripting techniques..
Re: MS PAIN - AUTOMATION OF REPEATED TASK
uh, yes, i suppose u could. with moderate success, u could also use a flappy dildo as a makeshift hammer to bludgeon nails in a piece of 2x4. ...but why though? why would u do any of that?but can i do the same using autohotkey scripts....?
anyways, i recommend u make a backup of ur imgs elsewhere as well
Code: Select all
#NoEnv
#SingleInstance Force
SendMode Input
SetWorkingDir %A_ScriptDir%
/*
folder structure should be
some_folder
- src
- img1.png
- img2.png
- etc...
- dest
- script.ahk
*/
FileCopyDir src, dest, 1
Loop Files, dest\*.png
ResizeWithPaint(A_LoopFileFullPath)
ResizeWithPaint(fileFullPath) {
static CMD := A_ComSpec " /c mspaint ""{}"""
Run % Format(CMD, fileFullPath) ; run paint with file
Sleep 300
Send !fe100{Tab}100{Enter}!{F4}s ; properties -> change dims 100x100 -> ok -> altf4 -> confirm save
}
Re: MS PAIN - AUTOMATION OF REPEATED TASK
Thank you very much for your help.
It works ….
I googled for all the keywords, that u used in the script and understood the basics of script writing. Im really excited.
There was a small issue….while resizing it always gives the top left 100x100 pixel area only. My intention was to resize the entire image …so i just replaced !fe with !hre with opens a different menu for resizing and some minor adjustments based on the new menu. And i inserted some sleeps in between. Now it works perfectly for me….
Once again thanks.....
It works ….
I googled for all the keywords, that u used in the script and understood the basics of script writing. Im really excited.
There was a small issue….while resizing it always gives the top left 100x100 pixel area only. My intention was to resize the entire image …so i just replaced !fe with !hre with opens a different menu for resizing and some minor adjustments based on the new menu. And i inserted some sleeps in between. Now it works perfectly for me….
Once again thanks.....
Who is online
Users browsing this forum: Google [Bot] and 155 guests