mingsai

Numbers Addressing a Table's Parent Sheet

Feb 22nd, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tell application "Numbers"
  2.     activate
  3.     if not (exists document 1) then error number -128
  4.    
  5.     tell document 1
  6.         --addressing a sheet by its name
  7.         tell sheet "2014 Expenses"
  8.             --table making command goes here
  9.         end tell
  10.        
  11.         --addressing a sheet by its index value
  12.         tell sheet 5
  13.             --table making command goes here
  14.         end tell
  15.        
  16.         --addressing the currently displayed sheet
  17.         tell active sheet
  18.             --table making command goes here
  19.         end tell
  20.         --addressing a stored reference to a specific sheet
  21.         tell thisSheet to make new sheet
  22.         tell thisSheet
  23.             --table making command goes here
  24.         end tell
  25.     end tell
  26. end tell
Advertisement
Add Comment
Please, Sign In to add comment