Odd or even number

Does Applescript knows the difference between odd and even numbers?

I have that to count the number of pages in a PDF…

tell application "Adobe Acrobat Pro"
		open theFIle
		tell active doc
			set PageCount to (count of every page)
end tell

I want to get the result and then the script will do something if the result is even or another thing if its odd…

Thank you


use the modulo operator

pageCount mod 2 -- > 0 if even, 1 if odd

Thank you, perfect :slight_smile: