Skip to content

Instantly share code, notes, and snippets.

@fielding
Created June 26, 2012 12:22
Show Gist options
  • Save fielding/2995533 to your computer and use it in GitHub Desktop.
Save fielding/2995533 to your computer and use it in GitHub Desktop.
d3 Americas Server Status
global d3status
on run
set d3status to ""
end run
on idle
if d3status is not "Available" then
set thesource to do shell script "curl us.battle.net/d3/en/status"
set atid to AppleScript's text item delimiters
set AppleScript's text item delimiters to "Americas"
set thestatus to text item 2 of thesource
set AppleScript's text item delimiters to "tooltip=\""
set thestatus to text item 2 of thestatus
set AppleScript's text item delimiters to "\""
set thestatus to text item 1 of thestatus
set AppleScript's text item delimiters to atid
if thestatus is "Available" then
beep 3
display dialog "Diablo 3 Americas game server is online"
end if
set d3status to thestatus
end if
return 10
end idle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment