[solved] script that does not work anymore
Posted: 22 Mar 2020 09:58
Hello, for some reason this code does not work as intended. It’s supposed to resize images with XnViewMP. it works with one image but not if I select multiple images (the first image will be resized again and again). If I fix the size, it seems to work correctly. The script worked some monthes ago.
Thanks for any help.
Code: Select all
"Redim au choix"
foreach($file, "<get SelectedItemsPathNames |>") {
$ext = gpc($file, "ext");
$oldName = gpc($file, "base");
$newName = replace(recase($oldName, "lower"), " ", "-");
rename "s", "$oldName/$newName";
}
$largeur = input("La plus grande taille max", "Entrer valeur");
wait 300;
foreach($file, "<get SelectedItemsPathNames |>") {
runret("""C:\Program Files\nconvert\nconvert.exe"" -ratio -rtype lanczos -rflag orient -quiet -resize longest"." $largeur"." -out jpeg -o ""E:\images\Output\%.jpg"" ""<curpath>\$newName.$ext""");
}
end confirm ("Allez à Output ?") == 0;
goto "E:\images\Output";