Hello all,
I am using an application called “Skim”, which analyzes a PDF. My end goal is to get a count of all words less than 7 points that are filled with white, without repeating through a list of words.
This snippet does not work:
tell application "Skim"
set myColor to "65535654246521765535"
set myCount to count of (words of text of front document whose size is less than 7 and color is "65535654246521765535")
end tell
it returns the following error:
error “Skim got an error: Can’t make "65535654246521765535" into type RGBA color.” number -1700 from “65535654246521765535” to RGBA color
However,
I can use a separate script to get a color of a specific word. For example:
tell application "Skim"
set my2ndWordColor to color of word 2 of text of front document as string
end tell
Will return: “65535654246521765535”
if my2ndWordColor is not set to string, then the result would be {65535, 65424, 65217, 65535}
Likewise, I can use a separate script to determine how many words are less than 7 points:
tell application "Skim"
set myCount to count (words of text of front document whose size is less than 7)
end tell
will return: 3
Therefore, I have seen some crazy one liners from this group and was hoping there was a way to count each word that is both less than 7 in size and whose color (as string) is “65535654246521765535”
I know it’s a stretch, but I figured I would ask just in case somebody is up for the challenge to help?