Posted on Sat - September 9, 2006 Updated weather scriptThis version of my weather script is no longer
dependent on my specific computers to run. It also checks for the Konfabulator
widget folder before trying to launch those widgets. It pops up the weather
maps, then shortly after moves the maps to the Users:Shared folder and quits
Preview.
Since it is not as dependent on my specific
setups, this script is shorter and faster than it's predecessor. There are some
specific 10.4 elements in this script though, I don't think it will run under
10.3 without tweaking.
tell
application
"Finder"
if
folder
"Users:Shared:Widgets"
of
startup
disk
exists
then
open
file
"Users:Shared:Widgets:The Weather.widget"
of
startup disk
open
file
"Users:Shared:Widgets:The Weather #2.widget"
of
startup disk
open
file
"Users:Shared:Widgets:The Weather #3.widget"
of
startup disk
open
file
"Users:Shared:Widgets:The Weather #4.widget"
of
startup disk
open
file
"Users:Shared:Widgets:The Weather #5.widget"
of
startup disk
end
if
end
tell
set
temperature_map
to
"acttemp_720x486.jpg" --
temperatures
set
weather_map
to
"curwx_720x486.jpg" --
surface isobars
set
channel_URL
to
"http://maps.weather.com/images/maps/current/"
set
the
target_URL
to
channel_URL
& temperature_map
set
the
destination_file1
to
((path to
desktop
as
string)
& "tempermap.jpg")
tell
application
"URL Access Scripting"
download
target_URL
to
file
destination_file1
replacing
yes
end
tell
set
the
target_URL
to
channel_URL
& weather_map
set
the
destination_file
to
((path to
desktop
as
string)
& "weathermap.jpg")
tell
application
"URL Access Scripting"
download
target_URL
to
file
destination_file
replacing
yes
end
tell
tell
application
"Preview"
open
alias
destination_file
open
alias
destination_file1
delay
33
quit
end
tell
tell
application
"Finder"
move
file
"Desktop:weathermap.jpg"
of
home
to
folder
"Users:Shared"
of
startup
disk
with
replacing
move
file
"Desktop:tempermap.jpg"
of
home
to
folder
"Users:Shared"
of
startup
disk
with
replacing
end
tell
|
Hello There
This is my no frills blog to cover all the gadgets and gizmos and technology that makes 21st Century life so exciting. Think of it as a messy set of notes that I keep for myself on all sorts of topics. It's really intended for my personal use, but I will explain sometimes as I go along.
My passion is for Macintosh and other Apple products, but I will use others as needed. If my notes and experiences can help or amuse you, so much the better. Categories
Calendar
Archives
XML/RSS Feed
Neolinks
Homepage AOL Homepage Geocities Homepage Dot Mac Homepage PaganVigil AOL Pagan Vigil Geocities Pagan Vigil Dot Mac Pagan Vigil Technopagan Yearnings AOL Technopagan Yearnings Geocities Technopagan Yearnings Dot Mac Technopagan Yearnings Webmaster NetworkSolutions Dot Mac dotmac.info WhatTheFont MacHighway America Online Yahoo! Geocites ZoneEdit iBlog HaloScan StatCounter Feed to JavaScript Performancing Design Re-Imagineering Steampunk Workshop Design Observer Subtraction Paleo-Future Hardware Apple CDW Cyberguys PCMall X-Treme Geek Software TypeStyler Graphic Converter Palm News & Info Palm Infocenter Brighthand Forums - Palm mytreo.net Making Music Apple - iLife - GarageBand iCompositions Royalty Free Music, Free Sound Effects, Royalty-free Sounds Tune Up Loops Twin Cities MIDI Home Page Andy's OSX Music Page Apple Logic Pro - AUDIO Hints & Tips Library of scanned player piano music rolls Garritan Orchestral Libraries Drums on Demand Bandmateloops Coolness Gizmodo Engadget Daring Fireball RoughlyDrafted Magazine Applefritter iGeek MaKiDo Mac vs. PC Info Why I Hate Microsoft World of Ends Tracking What Is My IP Address? IP Address Trace Geektools WHOIS ARIN WHOIS Database Search Zabra People Search NeoBlogs
Statistics
Total entries in this blog:
Total entries in this category: Published On: Dec 07, 2008 01:28 PM |