Hello,
I have been using a script that was kindly provided by a user here. It is for Omnigraffle/excel and I am having some issues with the Omnigraffle here. It won’t find the correct graffle id’s. I know the basics of the language, and thought I understood this code, but I can’t understand why this is happening. It is finding a bunch of id’s that don’t correspond to any objects that are on my sheet.
tell application "OmniGraffle"
set graffleName to name of its document 1
tell canvas of its document graffleName
set {o's theSols} to (every graphic of it)
local tst
repeat with i from 1 to (length of o's theSols)
set tst to origin of (contents of item i of o's theSols)
set end of o's sorted to {item 1 of tst, item 2 of tst, id of item i of o's theSols}
end repeat
end tell
end tell
CustomMergeSort(o's sorted, 1, -1, compObj1)
set o's sorted to rest of o's sorted
set tmpL to {}
repeat with i from 1 to (count o's sorted)
set end of tmpL to item 3 of item i of o's sorted
if (i mod 13) = 0 then
set end of o's prepp to tmpL
set tmpL to {}
end if
end repeat
-- We are now having a list of list with id's of graphich objects resembling the rows of the
-- results table.
It hasn’t worked since the omnigraffle update, but I don’t know of anything in the update that could cause a bug like this.
Thanks,
Austin