This question is related to:
where I'm trying to figure out a way to do what I want using AppleScript.
I've been searching the Web to find a way to set the active sheet in Numbers before I attempt to make a modification there. The preliminary steps are essentially:
tell application "Numbers"
set the chosenDocumentFile to "/path/to/myfile.numbers"
open the chosenDocumentFile
on error errorMessage number errorNumber
if errorNumber is not -128 then
display alert errorNumber message errorMessage
-- this is where I'm stuck
Most of the stuff I've found online talks about creating or deleting sheets, but I haven't found anything that provides a clear example of how to select a sheet.
In my case I currently have 5 sheets in my spreadsheet. I know I want to select the second sheet to act on (
sheet 2 - right?)
open the sheet 2
open sheet 2
select sheet 2
activate sheet 2
None of them seem to work, and all of them prevent the next line of code within that enclosing
try statement from being executed.
I'm hoping there's some really simple answer for this (I still have lots to do before I get the code to do everything I want it to, but I'm stuck here right now).