Syntax Error: AppleScript for Numbers
when I execute AppleSript below, Syntax Error occurred.
on run {input, parameters}
tell application "Numbers"
activate
tell the first table of the active sheet of document 1
repeat with i from 1 to the count of cells of the selection range
set the value of cell i of the selection range to (random number from 1 to 100)
end repeat
end tell
end tell
end run
I'm a totally beginner for iWork Automation and appreciate any comment or advice.
MacBook Pro 13″, macOS 11.3