Re: Weird error in Numbers
Re: Weird error in Numbers
- Subject: Re: Weird error in Numbers
- From: Axel Lüttgens via AppleScript-Users <email@hidden>
- Date: Fri, 31 Jan 2020 00:07:04 +0100
- Ironport-sdr: 3ekZFIj18wAkgonB2fhkCam1IFjn5q3CBTmba/Ob5L+4OunYjDIoY1M4Xd3N3sMwr8KjkX8bPD roODRnmk8itrqMRDGfMzWrv0V7r4EPvIKZRoL4j6gbQgk7Mtck2Gwa/D5OGgb4JweLA3c+2OyU /Hu9KK444bsUgiH2Wp3gUIeSzwP3e3mTaGYagTaTgxdnPxhHObEFBaJe23TcSrupGqE7SuuFuB UvcJIVyTNthsYvMSq3whvaRL8wAWcPAVXlb+nRDpO/qfAVQKfr69WASpH+eCZnTcTfr2Su96/r epI=
> Le 30 janv. 2020 à 23:08, Deivy Petrescu a écrit :
>
> Hi Axel,
>
> No, the problem happens with certain numbers in row and column.
> See also Takaaki’s scripts (he sent the link to the pages).
>
> What you are saying is expected, row count is a property which has to be set
> so one can not use "set row count to row count”.
> As Takaaki’s script show, row count =10 also produces an error.
Hello Deivy,
Yes, a row count of 10 produces an error because I was wrong while counting the
rows of a "default" table… :-(
Command "make new table" creates here a 10x5 table, not a 8x5 table.
So, adapting one of Takaaki’s script so as to take what I wrote in my previous
post into account, one gets:
set aWidth to 5
set aHeight to 10
tell application "Numbers"
set aDoc to make new document
tell aDoc
tell active sheet
set tRes to make new table
tell tRes
if row count ≠ aHeight then set row count to aHeight
if column count ≠ aWidth then set column count to aWidth
end tell
end tell
end tell
end tell
and the two problematic cases (row count = 10, column count = 5) are handled in
a generic way.
Axel
_______________________________________________
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