Numbers got an error: Can’t get document 1. (-1728)

Hi everyone.


First — the script works fine on other mac.


Second — I have read everything what i could find on the web. And i also tried every solutions what i found:

I deleted all files with Number & iWork related files from

/Library/

/Users/username/Library/


nothing happen.

set documentSource to 1

set tblName to "Table 1"

display dialog "Количество треков" default answer ""

set tracksAmount to text returned of result



tell application "Numbers"

activate

end tell



set srcArtistFeat to "G2:G" & tracksAmount -- исполнитель трека

set destArtistFeat to "A"



set srcArtist to "F2:F" & tracksAmount -- исполнитель альбома

set destArtist to "B"



set srcReleaseTitle to "E2:E" & tracksAmount -- название альбома

set destReleaseTitle to "C"



set srcGenre to "O2:O" & tracksAmount -- жанр

set destGenre to "D"



set srcDate to "L2:L" & tracksAmount -- дата

set destDate to "E"



set srcTrackNumber to "A2:A" & tracksAmount -- номер трека

set destTrackNumber to "J"



set srcProductionOwner to "M2:M" & tracksAmount -- правообладатель

set destProductionOwner to "M"



set srcTrackTitle to "B2:B" & tracksAmount -- название трека

set destTrackTitle to "N"



set srcSubtitle to "C2:C" & tracksAmount -- версия трека

set destSubtitle to "O"



set srcComposer to "J2:J" & tracksAmount -- композитор

set destComposer to "P"



set srcAuthor to "I2:I" & tracksAmount -- автор

set destAuthor to "Q"



set srcCopyrightOwner to "N2:N" & tracksAmount -- владелец авторских прав

set destCopyrightOwner to "R"



--



tell application "Numbers" -- сказать Намберс

tell sheet "Metadatas" of document documentSource -- чтобы сказал странице

tell table tblName -- чтобы сказала таблице


-------------------- Исполнитель трека

set destCol to range destArtistFeat's column's address

repeat with counter in range srcArtistFeat's cells

set val to counter's value

set rowadress to (counter's row's address) + tracksAmount -- с какой строки вставлять

set row rowadress's cell destCol's value to val

end repeat

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


-------------------- Исполнитель альбома

set destCol to range destArtist's column's address

repeat with counter in range srcArtist's cells

set val to counter's value

set rowadress to (counter's row's address) + tracksAmount -- с какой строки вставлять

set row rowadress's cell destCol's value to val

end repeat

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


-------------------- Название альбома

set destCol to range destReleaseTitle's column's address

repeat with counter in range srcReleaseTitle's cells

set val to counter's value

set rowadress to (counter's row's address) + tracksAmount -- с какой строки вставлять

set row rowadress's cell destCol's value to val

end repeat

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


-------------------- Жанр

set destCol to range destGenre's column's address

repeat with counter in range srcGenre's cells

set val to counter's value

set rowadress to (counter's row's address) + tracksAmount -- с какой строки вставлять

set row rowadress's cell destCol's value to val

end repeat

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


-------------------- Дата

set destCol to range destDate's column's address

repeat with counter in range srcDate's cells

set val to counter's value

set rowadress to (counter's row's address) + tracksAmount -- с какой строки вставлять

set row rowadress's cell destCol's value to val

end repeat

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


-------------------- Номер трека

set destCol to range destTrackNumber's column's address

repeat with counter in range srcTrackNumber's cells

set val to counter's value

set rowadress to (counter's row's address) + tracksAmount -- с какой строки вставлять

set row rowadress's cell destCol's value to val

end repeat

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


-------------------- Правообладатель

set destCol to range destProductionOwner's column's address

repeat with counter in range srcProductionOwner's cells

set val to counter's value

set rowadress to (counter's row's address) + tracksAmount -- с какой строки вставлять

set row rowadress's cell destCol's value to val

end repeat

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


-------------------- Название трека

set destCol to range destTrackTitle's column's address

repeat with counter in range srcTrackTitle's cells

set val to counter's value

set rowadress to (counter's row's address) + tracksAmount -- с какой строки вставлять

set row rowadress's cell destCol's value to val

end repeat

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


-------------------- Версия трека

set destCol to range destSubtitle's column's address

repeat with counter in range srcSubtitle's cells

set val to counter's value

set rowadress to (counter's row's address) + tracksAmount -- с какой строки вставлять

set row rowadress's cell destCol's value to val

end repeat

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


-------------------- Композитор

set destCol to range destComposer's column's address

repeat with counter in range srcComposer's cells

set val to counter's value

set rowadress to (counter's row's address) + tracksAmount -- с какой строки вставлять

set row rowadress's cell destCol's value to val

end repeat

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


-------------------- Автор

set destCol to range destAuthor's column's address

repeat with counter in range srcAuthor's cells

set val to counter's value

set rowadress to (counter's row's address) + tracksAmount -- с какой строки вставлять

set row rowadress's cell destCol's value to val

end repeat

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


-------------------- Владелец авторских прав

set destCol to range destCopyrightOwner's column's address

repeat with counter in range srcCopyrightOwner's cells

set val to counter's value

set rowadress to (counter's row's address) + tracksAmount -- с какой строки вставлять

set row rowadress's cell destCol's value to val

end repeat

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


end tell

end tell

end tell

iMac with Retina 5K display, OS X El Capitan (10.11.5), null

Posted on Jul 11, 2016 4:04 AM

Reply

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Numbers got an error: Can’t get document 1. (-1728)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.