Weather is a simple application which puts the current temperature in the dock.
The following AppleScript can be used to retrieve the temperature value. Modify the fileAlias variable to match your system.
try set linefeed to ASCII character 10 set fileAlias to "Home:Users:steve:outside-temp" set fileRefNum to open for access fileAlias set temp to round (read fileRefNum before linefeed) as real close access fileRefNum end try