apple script selection range
here is the script I use everyday that works great, but I feel could be cut in half if someone can help me how to figure out how to paste in cells "B2:E2" & "Z2:AA2" at the same time.
tell application "Numbers"
activate
tell document 1
tell sheet 3
tell table 1
set selection range to range "G2:J2"
end tell
end tell
end tell
end tell
copyit()
delay 1
tell application "Numbers"
activate
tell document 1
tell sheet 2
tell table 1
add row above second row
set selection range to range "A2"
end tell
end tell
end tell
end tell
delay 1
tell application "Numbers"
activate
tell document 1
tell sheet 2
tell table 1
set selection range to range "B2:E2"
end tell
end tell
end tell
end tell
delay 1
tell application "System Events"
tell application "Numbers" to activate
keystroke "v" using {command down}
end tell
delay 1
tell application "Numbers"
activate
tell document 1
tell sheet 3
tell table 1
set selection range to range "K2:L2"
end tell
end tell
end tell
end tell
copyit()
delay 1.5
tell application "Numbers"
activate
tell document 1
tell sheet 2
tell table 1
set selection range to range "Z2:AA2"
end tell
end tell
end tell
end tell
delay 1
tell application "System Events"
tell application "Numbers" to activate
keystroke "v" using {command down}
end tell
iMac (M3, 2023)