I hope this helps. I have been struggling to re-learn what little scripting I know. I did not create the script, but trying to maintain it. Below is the replies from the Log History.
tell application "Adobe Illustrator"
get contents of selection
--> "Client"
activate
get properties of selection
--> {character offset:1, length:6, contents:"Client", kerning:missing value, story:story 1 of document 1, selection:{text from character 1 to character 6 of story 1 of document 1}, container:story 1 of document 1, best type:reference, default type:reference, class:text, index:1, text font:text font "HelveticaNeueLTStd-HvCn", size:13.0, horizontal scale:100.0, vertical scale:100.0, auto leading:false, leading:17.0, tracking:0, baseline shift:0.0, rotation:0.0, kerning method:optical, capitalization:normal, baseline position:normal, OpenType position:default, ligature:true, discretionary ligature:false, contextual ligature:false, fractions:false, ordinals:false, swash:false, titling:false, connection forms:false, stylistic alternates:false, ornaments:false, figure style:default, proportional metrics:false, italics:false, baseline direction:standard, language:English, alternate glyphs:default, Tsume:0.0, alignment:roman baseline, warichu enabled:false, warichu lines:2, warichu gap:0, warichu scale:50.0, warichu characters before break:2, warichu characters after break:2, warichu justification:auto justify, TCY vertical:0, TCY horizontal:0, aki left:-1.0, aki right:-1.0, no break:false, fill color:{class:spot color info, tint:100.0, spot:spot 2 of document 1}, stroke color:{class:no color info}, overprint stroke:false, overprint fill:false, stroke weight:1.0, underline:false, strike through:false, justification:left, first line indent:0.0, left indent:0.0, right indent:0.0, space before:0.0, space after:0.0, hyphenation:false, minimum hyphenated word size:6, minimum before hyphen:2, minimum after hyphen:2, maximum consecutive hyphens:99, hyphenation zone:36.0, hyphenate capitalized words:true, hyphenation preference:0.5, desired word spacing:100.0, maximum word spacing:150.0, minimum word spacing:89.999997615814, desired letter spacing:0.0, maximum letter spacing:10.000000149012, minimum letter spacing:-5.000000074506, desired glyph scaling:100.0, maximum glyph scaling:100.0, minimum glyph scaling:100.0, single word justification:full justify, auto leading amount:120.000004768372, leading type:bottom to bottom, tab stops:{}, roman hanging:false, BunriKinshi:true, Burasagari type:none, Kinsoku order:push in, KurikaeshiMojiShori:false, Kinsoku:missing value, Mojikumi:missing value, every line composer:false}
end tell
tell application "System Events"
keystroke "a" using command down
end tell
tell application "Adobe Illustrator"
redraw
--> current application
get properties of selection
--> {character offset:1, length:303, contents:"Client: COVERGIRL
Job#: 16PGCWT001
Target Spring 17
File Name:
44524011_CWT001_EyeEnhancers_BN.ai
Date/Artists: 09.12.16 RB
Last Revision: 09.13.16 RB
Change Order#: 009
Die#: 110500_1ft_BN
Size: 11.674\" w x 1.900\" h
DIE INFO AND DIMS ARE FINAL
Application: Illustrator CC
ART IS: 100% PROOF IS: 100% ", kerning:missing value, story:story 1 of document 1, selection:{text from character 1 to character 303 of story 1 of document 1}, container:story 1 of document 1, best type:reference, default type:reference, class:text, index:1, text font:text font "HelveticaNeueLTStd-HvCn", size:13.0, horizontal scale:100.0, vertical scale:100.0, auto leading:false, leading:17.0, tracking:0, baseline shift:0.0, rotation:0.0, kerning method:optical, capitalization:normal, baseline position:normal, OpenType position:default, ligature:true, discretionary ligature:false, contextual ligature:false, fractions:false, ordinals:false, swash:false, titling:false, connection forms:false, stylistic alternates:false, ornaments:false, figure style:default, proportional metrics:false, italics:false, baseline direction:standard, language:English, alternate glyphs:default, Tsume:0.0, alignment:roman baseline, warichu enabled:false, warichu lines:2, warichu gap:0, warichu scale:50.0, warichu characters before break:2, warichu characters after break:2, warichu justification:auto justify, TCY vertical:0, TCY horizontal:0, aki left:-1.0, aki right:-1.0, no break:false, fill color:{class:spot color info, tint:100.0, spot:spot 2 of document 1}, stroke color:{class:no color info}, overprint stroke:false, overprint fill:false, stroke weight:1.0, underline:false, strike through:false, justification:left, first line indent:0.0, left indent:0.0, right indent:0.0, space before:0.0, space after:0.0, hyphenation:false, minimum hyphenated word size:6, minimum before hyphen:2, minimum after hyphen:2, maximum consecutive hyphens:99, hyphenation zone:36.0, hyphenate capitalized words:true, hyphenation preference:0.5, desired word spacing:100.0, maximum word spacing:150.0, minimum word spacing:89.999997615814, desired letter spacing:0.0, maximum letter spacing:10.000000149012, minimum letter spacing:-5.000000074506, desired glyph scaling:100.0, maximum glyph scaling:100.0, minimum glyph scaling:100.0, single word justification:full justify, auto leading amount:120.000004768372, leading type:bottom to bottom, tab stops:{}, roman hanging:false, BunriKinshi:true, Burasagari type:none, Kinsoku order:push in, KurikaeshiMojiShori:false, Kinsoku:missing value, Mojikumi:missing value, every line composer:false}
set selection to {}
redraw
--> current application
get every text frame of document 1 whose contents = "Client: COVERGIRL
Job#: 16PGCWT001
Target Spring 17
File Name:
44524011_CWT001_EyeEnhancers_BN.ai
Date/Artists: 09.12.16 RB
Last Revision: 09.13.16 RB
Change Order#: 009
Die#: 110500_1ft_BN
Size: 11.674\" w x 1.900\" h
DIE INFO AND DIMS ARE FINAL
Application: Illustrator CC
ART IS: 100% PROOF IS: 100% "
--> {text frame 1 of layer 4 of document 1}
end tell
tell application "System Events"
set frontmost of process "Adobe Illustrator" to true
set frontmost of process "Adobe Illustrator" to true
click menu item "Default" of menu "Tools" of menu item "Tools" of menu "Window" of menu bar item "Window" of menu bar 1 of process "Adobe Illustrator"
--> menu item "Default" of menu "Tools" of menu item "Tools" of menu "Window" of menu bar item "Window" of menu bar 1 of application process "Adobe Illustrator"
get size of every window of process "Adobe Illustrator"
--> {{2580, 1382}}
set frontmost of process "Adobe Illustrator" to true
click menu item "Default" of menu "Tools" of menu item "Tools" of menu "Window" of menu bar item "Window" of menu bar 1 of process "Adobe Illustrator"
--> menu item "Default" of menu "Tools" of menu item "Tools" of menu "Window" of menu bar item "Window" of menu bar 1 of application process "Adobe Illustrator"
get size of every window of process "Adobe Illustrator"
--> {{2580, 1382}}
Result:
error "Can’t get item 1 of {}." number -1728 from item 1 of {}