-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgrids
More file actions
29 lines (26 loc) · 1.08 KB
/
grids
File metadata and controls
29 lines (26 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
-- ----------------------------------------------------------------------------
-- creates a grid of lines on the current slide of the frontmost Keynote deck
--
-- these values well for a deck that is 2048x1536
-- for a square grid, choose gridSize value that divides evenly for both width and height
--
-- As with all AppleScripts I use - many thanks and most of the credit goes to Sal Soghoian
--
property gridSize : 128
tell application "Keynote"
activate
tell document 1
set documentWidth to its width
set documentHeight to its height
tell current slide
repeat with y from gridSize to (documentHeight - gridSize) by gridSize
set thisLine to make new line with properties {start point:{gridSize, y}, end point:{documentWidth - gridSize, y}, reflection showing:false}
end repeat
repeat with x from gridSize to (documentWidth - gridSize) by gridSize
set thisLine to make new line with properties {start point:{x, gridSize}, end point:{x, documentHeight - gridSize}, reflection showing:false}
end repeat
end tell
end tell
end tell
-- -------------------
-- Nothing follows.