• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Scripting Numbers Just a Little
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripting Numbers Just a Little


  • Subject: Scripting Numbers Just a Little
  • From: Christopher Stone <email@hidden>
  • Date: Mon, 06 Feb 2017 20:30:23 -0600

Hey Folks,

I've always hated Apple's Numbers and preferred Microsoft Excel.

But – I needed to script a solution for someone in Numbers and have been fiddling with it over the last couple of days.  I think it's improved enough that I no longer hate it, but I don't think I'll prefer it to Excel anytime soon.

That said – I cannot for the life of me figure out how to select a cell in table 1 of document 1 with just the keyboard.

This is never a problem in Excel – there is always a selection – and Ctrl (or Cmd) + Home will get you to row 1 cell 1 in a hurry.

Perhaps someone knows how to do this in Numbers, but I went through all the keyboard shortcuts in the help and couldn't find a way.

This was driving me batty a few hours ago, so I wrote a script to select the first row of table 1 (or alternatively the first cell of that first row).

After giving it a keyboard shortcut with FastScripts I'm in a much better mood.  :)

--
Best Regards,
Chris

----------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2017/02/06 20:00
# dMod: 2017/02/06 20:17
# Appl: Numbers
# Task: Select Cell 1 or Row 1 of Table 1
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @Numbers, @Select, @Cell, @Table
----------------------------------------------------------------

tell application "Numbers"
   if document 1 exists then
      tell document 1
         tell active sheet
            if table 1 exists then
               tell table 1
                  # Select first cell of first row of table 1:
                  set selection range to cell 1 of row 1
                  # Select first row of table 1:
                  # set selection range to row 1
               end tell
            end if
         end tell
      end tell
   end if
end tell

----------------------------------------------------------------

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Scripting Numbers Just a Little
      • From: Yvan KOENIG <email@hidden>
  • Prev by Date: Fwd: Muting voice-over when microphone is activated
  • Next by Date: Scripting Numbers a Little More – Extracting Data into an Array
  • Previous by thread: Fwd: Muting voice-over when microphone is activated
  • Next by thread: Re: Scripting Numbers Just a Little
  • Index(es):
    • Date
    • Thread