How to generate a random even number with Applescript

applescript

I'm trying to create an Applescript that will change the MAC address of my router automatically. Some fields need to be even numbers but I can't figure out how to generate even numbers only. Heres what I have so far ..

set rand1 to (random number from 10 to 98) as string
set rand2 to (random number from 10 to 98) as string
set rand3 to (random number from 10 to 98) as string
set rand4 to (random number from 10 to 98) as string

tell application "Safari"
    activate
    open location "router-address/WanMAC.asp"
    tell application "System Events"
        delay 1
        keystroke "login"
        keystroke tab
        keystroke "password"
        delay 1
        keystroke return
        delay 1
        keystroke tab
        keystroke rand1
        keystroke tab
        keystroke rand2
        keystroke tab
        keystroke rand3
        keystroke tab
        keystroke rand4
        submit via javascript?
    end tell
end tell

Pretty rudimentary I know. But the basic idea is to fill in my login credentials, tab to the form fields that need to be changed, inputs a valid MAC address and then submits the form. Can anyone help? Thank you.

Best Answer

You can just multiply by 2:

(random number from 5 to 49) * 2