Hi,
Here's a fragile script that should work if the page design doesn't change at all...
All it does is get the score in the front window of safari - but it could be extended very easily... I'm just not sure how you put your paper together.
[php]
on run
-- Get the source of the Page.
tell application "Safari"
set the reviewSource to the source of the front document
-- Get the meta-tag - this is very fragile and could easily break with a small change to the site
set metaTagSource to the fifth paragraph of reviewSource as text
end tell
-- Search for the metaScore part of the tag
set savedTextItemDelimiters to AppleScript's text item delimiters
try
set AppleScript's text item delimiters to {"METASCORE="}
set brokenUpTagParts to text items of metaTagSource
set scoreBitWithTrailingData to second item of brokenUpTagParts
-- refine
set AppleScript's text item delimiters to {"."}
set metaScore to first item of text items of scoreBitWithTrailingData
--reset the text item delimiters:
set AppleScript's text item delimiters to savedTextItemDelimiters
on error m number n from f to t partial result p
--also reset text item delimiters in case of an error:
set AppleScript's text item delimiters to savedTextItemDelimiters
--and resignal the error:
-- error number n from f to t partial result p
display dialog "Could not find the score. - are you sure the front window is a metascore review?" buttons {"OK"} default button 1
return
end try
display dialog "MetaScore: " & metaScore buttons {"OK"} default button 1
end run
[/php]