Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
Not open for further replies.
Typhoon,

Here it is, THE multiple warnings script!! =P
I was only able to test with 3 hazards and it worked so normally it will do fine with 6 or more.
i've set your location weather link, and yeah not very interesting only sun sun sun sun and moon

Can you post a screenshot from your geektool setup?

Code:
tell application "Finder"
	set AppleScript's text item delimiters to ""
	set warn to do shell script "curl \"http://forecast.weather.gov/MapClick.php?CityName=Washburn&state=WI&site=DLH&textField1=46.6739&textField2=-90.8933&e=0\""
	
	-- count every warning!!
	set AppleScript's text item delimiters to "<"
	set warn_string to every text item of (warn as string)
	
	set amo_warn to 1
	repeat with i in items of warn_string
		if (i as string) contains "span class=\"warn\">" then
			set amo_warn to amo_warn + 1
		end if
	end repeat
	
	-- getting the warnings
	set warnings to ""
	set warn_number to 1
	
	repeat until warn_number = (amo_warn)
		set warn_number to warn_number + 1
		try
			set AppleScript's text item delimiters to "<span class=\"warn\">"
			set temp_warnings to text item warn_number of (warn as string)
			set AppleScript's text item delimiters to "</span>"
			set temp_warnings to text item 1 of temp_warnings
			set AppleScript's text item delimiters to ""
			set warnings to warnings & temp_warnings & return
		end try
	end repeat
	
	if warnings = "" then
		set warnings to "No upcoming weather hazards"
	end if
	
	return warnings
	
end tell
 
Only two weather headlines at the moment, for my location... and they both are showing up perfectly! I like the default message of no upcoming weather hazards.

I took the single warning out of the three-day forecast text script, I think I want the warnings to remain separate from the forecast.

With some luck I'll have time later in the day to find a location with fun weather and check out how well the multiple warning script works. Right now, I couldn't be happier. Thanks so much Tomge!

My desktop picture and GT scripts are constantly being tweaked and moved, but this screen shot is how they all look as of this afternoon. Thanks to everyone who posts on this thread, you're all amazing :)
 

Attachments

  • Screen shot 2010-05-21 at 3.29.35 PM.png
    Screen shot 2010-05-21 at 3.29.35 PM.png
    769.8 KB · Views: 615
You're welcome Typhoon,

Oh well, that is a nice setup you got there. I was expecting a more cluttered
desktop with all those weather forecasts but you did a great job ;-)

I'm busy with a complete make over of my geektool setup.
Just need to finish some scripts and i'm all set.
 
You're welcome Typhoon,

Oh well, that is a nice setup you got there. I was expecting a more cluttered
desktop with all those weather forecasts but you did a great job ;-)

I'm busy with a complete make over of my geektool setup.
Just need to finish some scripts and i'm all set.

I'd love to see a shot of yours when you're finished!
 
Help!

i want to put a calendar and weather in my desktop, im trying to understan everything ut i cannot put.. huhuhu please help me... (by the way im not so good in english so thats why i cannot understand all)

QUESATION:

1. where is the code?
2. where should i paste it?
3 and how??

i already install the geektool on my MACBOOK.

im using macbook white 13 inch!
 
i want to put a calendar and weather in my desktop, im trying to understan everything ut i cannot put.. huhuhu please help me... (by the way im not so good in english so thats why i cannot understand all)

QUESATION:

1. where is the code?
2. where should i paste it?
3 and how??

i already install the geektool on my MACBOOK.

im using macbook white 13 inch!

Then what language do you speak?
 
My geektool setup,
It actually should look like a newspaper and tried to keep it clean.
in the paper i have: latest RSS feed with the intro, the weather, date & time, current song on the radio 'fm brussel', quote, iCal (without iCal buddy).

To make it more fun when some things change, i've set every script to toggle "growl" so a popup comes when there is a new feed, weather, other song, battery charge change with more than 10 and when my IP address changes.

And yes I made it work in a way that not every time the script runs that there will be a popup but only if the value has changed. (logic)

Other than that I've have my auto-backup and a toggle to open the webpage from the current rss feed when I tap the apple on the magic mouse. thx to magic prefs and my script =P

What you think?

PS. i'm using a dual screen so I've space to use my geektool setup and see it almost every time by just shifting my eyes towards the other screen =D. Every growl notification has it own icon, thats easier to see whats up. This is all done by applescript
 

Attachments

  • Screen shot 2010-05-25 at 15.45.01.png
    Screen shot 2010-05-25 at 15.45.01.png
    439.7 KB · Views: 181
  • Screen shot 2010-05-25 at 15.45.53.png
    Screen shot 2010-05-25 at 15.45.53.png
    97.9 KB · Views: 115
Weather Updated based on IP address (location) - US only (mostly?), I think

All,

Been a while since I've posted and some of my earlier scripts (that I was using) stopped working because of the changes to yahoo weather and the fact that IP locator I was using couldn't identify my main location.

So, I've finally gotten around to updating my weather and location (bash) scripts so that the weather displayed on my desktop is based on my current location (based on my current external IP address).

The first script just looks up the location of the IP address, gets the zip code and looks the zip code up using the yahoo weather links (to verify that we can get the location correctly) and displays the city and state (US).

Code:
#!/bin/bash

postal1=`curl -s http://ipinfodb.com/my_ip_location.php | awk '/Zip or postal code : /{print $6}';`
postal=`echo "$postal1" | tr -d '\r' | awk '{gsub(/<\\/li>/,"")}; 1'`



#Gets the location of the city I'm in
 curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f"  | grep -E '(<yweather:location city|"US"/>)'  | sed -e 's/<yweather\:location city="//' -e's/"   country="US"\/>//' -e 's/" region="/, /';

The second script does a lot of the same as the first - gets the zip code for the IP address and connects to the Yahoo rss feeds for weather information. It displays the current conditions (i.e. "Partly Cloudy, 80 F") and the next day's forecast (i.e. "Wed: Isolated Thunderstorms, 92|66").

Because of the way Yahoo changed the weather info in the RSS feed, I now use this script to build the URL for the PNG icon for the current condition (http://l.yimg.com/a/i/us/nws/weather/gr/<conditioncode><d or n>.png. To do this, I get the Condition Code from the RSS feed then determine if the current time is between the sunrise and sunset times listed in the RSS feed to determine the correct version of the .png to pull (d - day or n- night). It then saves the png to the /tmp/weather.png file as in the other examples throughout the forum...

Code:
#!/bin/bash

postal1=`curl -s http://ipinfodb.com/my_ip_location.php | awk '/Zip or postal code : /{print $6}';`
postal=`echo "$postal1" | tr -d '\r' | awk '{gsub(/<\\/li>/,"")}; 1'`

curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | grep -e "Forecast:" -A2 -B2  |tail -n 4 | grep -v orecast | sed -e 's/<br \/>//' -e 's/<BR \/>//' |  sed -n -E '2n;s/[ ]\-[ ](.+)\..+:[ ]([0-9]+).+:[ ]([0-9]+)/\: \1, \2 | \3/;p'
imagecode=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:condition/{print $4}' | sed -e 's/code="//' -e 's/"//';`

sunsethour=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $4}' | sed -e 's/sunset="//' -e 's/:.*//' ;`
sunsetminute=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $4}' | sed -e 's/sunset="//' -e 's/.*://' ;`
: $((sunsethour=$sunsethour+12));
sunset=$(($sunsethour*60+$sunsetminute));
sunrisehour=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $2}' | sed -e 's/sunrise="//' -e 's/:.*//' ;` 
sunriseminute=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $2}' | sed -e 's/sunrise="//' -e 's/.*://' ;`
sunrise=$(($sunrisehour*60+$sunriseminute));
currenttime=$(date +%H:%M);
currenthour=`echo $currenttime | sed -e 's/:.*//';`
currentminute=`echo $currenttime | sed -e 's/.*://';`
current=$(($currenthour*60+$currentminute))
if (("$current" > "$sunrise"))
then
	if (("$current" < "$sunset"))
	then
		dt="d"
	else
		dt="n"
	fi
else
	dt="n"
fi
curl --silent "http://l.yimg.com/a/i/us/nws/weather/gr/$imagecode$dt.png" -o /tmp/weather.png

I'm no script genius, and there are probably better/easier ways to do this, but since I move around a lot with my computer to different locations, I really wanted to keep focused on using the zip code of wherever I'm at and not build the full Yahoo weather URLs into the script...

I hope this helps anyone else trying to do something similar...

Jim
 
okay guys I have been fussing around with geektool for a bit and im fine with the simple date and time scripts... But im in need of some help here im having trouble getting the weather to show... I see many people with awesome weather icons and temperature and conditions and I need someone to give me a walkthrough for newbies... pretty much exactly what I type and where I type it to get something like this:
http://i420.photobucket.com/albums/pp284/arf900/Screenshot2010-05-01at61542PM.png

EDIT: so after some youtube help I got it working...
 
Can geektools accomplish something like this?

I have just scoured the internet and found a lot of quotes and copied them into a pages document, however it is not the most convenient way of seeing them.

So I was wondering, is there a 'ticker' bar, similar to a sports ticker, that you can add text to and it will scroll the text along?

Thanks

Or embed a document onto the desktop and then the text within can be scrolled as I have hundreds of quotes?...
 
Updated (again)

All,

Been a while since I've posted and some of my earlier scripts (that I was using) stopped working because of the changes to yahoo weather and the fact that IP locator I was using couldn't identify my main location.

So, I've finally gotten around to updating my weather and location (bash) scripts so that the weather displayed on my desktop is based on my current location (based on my current external IP address).

The first script just looks up the location of the IP address, gets the zip code and looks the zip code up using the yahoo weather links (to verify that we can get the location correctly) and displays the city and state (US).

Code:
#!/bin/bash

postal1=`curl -s http://ipinfodb.com/my_ip_location.php | awk '/Zip or postal code : /{print $6}';`
postal=`echo "$postal1" | tr -d '\r' | awk '{gsub(/<\\/li>/,"")}; 1'`



#Gets the location of the city I'm in
 curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f"  | grep -E '(<yweather:location city|"US"/>)'  | sed -e 's/<yweather\:location city="//' -e's/"   country="US"\/>//' -e 's/" region="/, /';

The second script does a lot of the same as the first - gets the zip code for the IP address and connects to the Yahoo rss feeds for weather information. It displays the current conditions (i.e. "Partly Cloudy, 80 F") and the next day's forecast (i.e. "Wed: Isolated Thunderstorms, 92|66").

Because of the way Yahoo changed the weather info in the RSS feed, I now use this script to build the URL for the PNG icon for the current condition (http://l.yimg.com/a/i/us/nws/weather/gr/<conditioncode><d or n>.png. To do this, I get the Condition Code from the RSS feed then determine if the current time is between the sunrise and sunset times listed in the RSS feed to determine the correct version of the .png to pull (d - day or n- night). It then saves the png to the /tmp/weather.png file as in the other examples throughout the forum...

Code:
#!/bin/bash

postal1=`curl -s http://ipinfodb.com/my_ip_location.php | awk '/Zip or postal code : /{print $6}';`
postal=`echo "$postal1" | tr -d '\r' | awk '{gsub(/<\\/li>/,"")}; 1'`

curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | grep -e "Forecast:" -A2 -B2  |tail -n 4 | grep -v orecast | sed -e 's/<br \/>//' -e 's/<BR \/>//' |  sed -n -E '2n;s/[ ]\-[ ](.+)\..+:[ ]([0-9]+).+:[ ]([0-9]+)/\: \1, \2 | \3/;p'
imagecode=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:condition/{print $4}' | sed -e 's/code="//' -e 's/"//';`

sunsethour=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $4}' | sed -e 's/sunset="//' -e 's/:.*//' ;`
sunsetminute=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $4}' | sed -e 's/sunset="//' -e 's/.*://' ;`
: $((sunsethour=$sunsethour+12));
sunset=$(($sunsethour*60+$sunsetminute));
sunrisehour=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $2}' | sed -e 's/sunrise="//' -e 's/:.*//' ;` 
sunriseminute=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $2}' | sed -e 's/sunrise="//' -e 's/.*://' ;`
sunrise=$(($sunrisehour*60+$sunriseminute));
currenttime=$(date +%H:%M);
currenthour=`echo $currenttime | sed -e 's/:.*//';`
currentminute=`echo $currenttime | sed -e 's/.*://';`
current=$(($currenthour*60+$currentminute))
if (("$current" > "$sunrise"))
then
	if (("$current" < "$sunset"))
	then
		dt="d"
	else
		dt="n"
	fi
else
	dt="n"
fi
curl --silent "http://l.yimg.com/a/i/us/nws/weather/gr/$imagecode$dt.png" -o /tmp/weather.png

I'm no script genius, and there are probably better/easier ways to do this, but since I move around a lot with my computer to different locations, I really wanted to keep focused on using the zip code of wherever I'm at and not build the full Yahoo weather URLs into the script...

I hope this helps anyone else trying to do something similar...

Jim


I found a problem with my weather.bash script that caused issues when getting the weather condition code. It's been fixed in this version:

Code:
#!/bin/bash

postal1=`curl -s http://ipinfodb.com/my_ip_location.php | awk '/Zip or postal code : /{print $6}';`
postal=`echo "$postal1" | tr -d '\r' | awk '{gsub(/<\\/li>/,"")}; 1'`

curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | grep -e "Forecast:" -A2 -B2  |tail -n 4 | grep -v orecast | sed -e 's/<br \/>//' -e 's/<BR \/>//' |  sed -n -E '2n;s/[ ]\-[ ](.+)\..+:[ ]([0-9]+).+:[ ]([0-9]+)/\: \1, \2 | \3/;p'
imagecode=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:condition/' | sed -e 's/.*code="//' -e 's/".*//';`

sunsethour=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $4}' | sed -e 's/sunset="//' -e 's/:.*//' ;`
sunsetminute=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $4}' | sed -e 's/sunset="//' -e 's/.*://' ;`
: $((sunsethour=$sunsethour+12));
sunset=$(($sunsethour*60+$sunsetminute));
sunrisehour=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $2}' | sed -e 's/sunrise="//' -e 's/:.*//' ;` 
sunriseminute=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $2}' | sed -e 's/sunrise="//' -e 's/.*://' ;`
sunrise=$(($sunrisehour*60+$sunriseminute));
currenttime=$(date +%H:%M);
currenthour=`echo $currenttime | sed -e 's/:.*//';`
currentminute=`echo $currenttime | sed -e 's/.*://';`
current=$(($currenthour*60+$currentminute))
if (("$current" > "$sunrise"))
then
	if (("$current" < "$sunset"))
	then
		dt="d"
	else
		dt="n"
	fi
else
	dt="n"
fi
curl --silent "http://l.yimg.com/a/i/us/nws/weather/gr/$imagecode$dt.png" -o /tmp/weather.png
 
One more update

Found another issue with the script in determining the d/n for the image code based on sunrise/sunset, etc when a the hour was returned by the date function with a leading 0.

Updated code:

Code:
#!/bin/bash
current=0
postal1=`curl -s http://ipinfodb.com/my_ip_location.php | awk '/Zip or postal code : /{print $6}';`
postal=`echo "$postal1" | tr -d '\r' | awk '{gsub(/<\\/li>/,"")}; 1'`

curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | grep -e "Forecast:" -A2 -B2  |tail -n 4 | grep -v orecast | sed -e 's/<br \/>//' -e 's/<BR \/>//' |  sed -n -E '2n;s/[ ]\-[ ](.+)\..+:[ ]([0-9]+).+:[ ]([0-9]+)/\: \1, \2 | \3/;p'
imagecode=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:condition/' | sed -e 's/.*code="//' -e 's/".*//';`

sunsethour=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $4}' | sed -e 's/sunset="//' -e 's/:.*//' ;`
sunsetminute=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $4}' | sed -e 's/sunset="//' -e 's/.*://' ;`
: $((sunsethour=$sunsethour+12));
sunset=$(($sunsethour*60+$sunsetminute));
sunrisehour=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $2}' | sed -e 's/sunrise="//' -e 's/:.*//' ;` 
sunriseminute=`curl --silent "http://weather.yahooapis.com/forecastrss?p=$postal&u=f" | awk '/yweather:astronomy/{print $2}' | sed -e 's/sunrise="//' -e 's/.*://' ;`
sunrise=$(($sunrisehour*60+$sunriseminute));
currenttime=$(date +%H:%M);
currenthour=$(date +%k)
currentminute=$(date +%M);
current=$(($currenthour*60+$currentminute))

if (("$current" > "$sunrise"))
then
	if (("$current" < "$sunset"))
	then
		dt="d"
	else
		dt="n"
	fi
else
	dt="n"
fi
curl --silent "http://l.yimg.com/a/i/us/nws/weather/gr/$imagecode$dt.png" -o /tmp/weather.png
 
Hey all,

I've recently discovered Geektool, but also noticed that some of the scripting is still far out of my league as I only recently made the switch to a Mac.

Therefore, I would like to ask you amazing coders if you would be able to pull anything like this off:

I have found this really neat Futurama wallpaper at kremalicious.com (http://www.kremalicious.com/2009/02/out-of-whale-oil/). For those not Futurama-fans (shame on you :p), the whale-oil is more or less the gasoline of the future, and therefore I figured that it would be nice to use the whale in the middle of the desktop to display my battery charge.

However, my issue: Can Geektools (v3) display conditional images?

Here's my basic idea:
I will use the background with the completely 'white' whale. This corresponds to a full battery charge.
I cut up the other image, with the nearly empty 'blue' whale into 9 parts. (The grid in the whale contains 10 blocks).
Then what I would need is a geeklet script that displays the first blue block on top of the background image as soon as my battery ticks below 90%, the second after 80%, etcetera.

Is there a script that could pull this off? I've already browsed this entire thread, but I havent seen anything like this yet. I did find the following piece of code by raltenbach on page 57, which already correctly returns the battery charge, if that is of any help:

Code:
#!/bin/bash

asbreg=`ioreg -rc "AppleSmartBattery"`

maxcap=`echo "${asbreg}" | awk '/MaxCapacity/{print $3}'`;
curcap=`echo "${asbreg}" | awk '/CurrentCapacity/{print $3}'`;

prcnt=`echo "scale=2; 100*$curcap/$maxcap" | bc`;

printf "%1.0f%%" ${prcnt};

#EOF

Many many thanks in advance guys!

I was looking at your problem and I think you can use something similar to how the people are displaying the weather icon from yahoo...

The code you posted above gives you a percentage of the current charge. Let's say you have (based on the graphic you selected) 10 versions of the whale pictures in a folder (say ~\Documents\whale\10.png, 20.png, etc. - one for each 10% of capacity. Instead of the printf statement above, you could use a select to copy the appropriate graphic to the /tmp directory and then use GeekTool to display the current graphic in the /tmp directory (let's say we call it whale.png):

Code:
prcnt=`echo "scale=2; 100*$curcap/$maxcap" | bc`;

case "$prcnt" in

	[90-100]* )
		cp ~/Documents/Whale/90.png ~/Desktop/Whale.png
		;;
	[80-90] )
		cp '~\Documents\Whale\80.png" "~\Desktop\whale.png'
		;;
	# etc etc
esac

Hope this helps..It's a great idea and one I may try to implement as well...
 
I was looking at your problem and I think you can use something similar to how the people are displaying the weather icon from yahoo...

The code you posted above gives you a percentage of the current charge. Let's say you have (based on the graphic you selected) 10 versions of the whale pictures in a folder (say ~\Documents\whale\10.png, 20.png, etc. - one for each 10% of capacity. Instead of the printf statement above, you could use a select to copy the appropriate graphic to the /tmp directory and then use GeekTool to display the current graphic in the /tmp directory (let's say we call it whale.png)

Hey, that's actually a brilliant idea! Sounds like that would work. I'll go try and see if I can implement this somehow. Cheers for sharing your thoughts on the matter. :)
 
This should be a simple request. I've tried the Sunrise ans Sunset scripts at the very beginning of this thread but they didn't work for me.

Anyway, I'd like a single script that displays the following (Ex.) on two lines:

Sunrise: 6:42 AM
Sunset: 8:30 PM

I've got the script below that displays the time OK...but it doesn't show "Sunrise" and "Sunset".

curl --silent http://weather.yahoo.com/united-states/california/folsom-12797905/| perl -pe 's/\n//g' | perl -pe 's/.*Sunrise:<\/dt><dd>//m' | sed -e 's/Sunrise/Sunrise: /g' | perl -pe 's/<\/dd>.*//m'

curl --silent http://weather.yahoo.com/united-states/california/folsom-12797905/| perl -pe 's/\n//g' | perl -pe 's/.*Sunset:<\/dt><dd>//m' | perl -pe 's/<\/dd>.*//m'


Thanks...
 
Anyway, I'd like a single script that displays the following (Ex.) on two lines:

Sunrise: 6:42 AM
Sunset: 8:30 PM

Code:
curl --silent "http://weather.yahoo.com/united-states/california/folsom-2404810/" | grep "Sunrise" | sed -e 's/.*\<dd\>/Sunrise: /' -e 's/<.*//'

Code:
curl --silent "http://weather.yahoo.com/united-states/california/folsom-2404810/" | grep "Sunset" | sed -e 's/.*\<dd\>/Sunset: /' -e 's/<.*//'
 
Code:
curl --silent "http://weather.yahoo.com/united-states/california/folsom-2404810/" | grep "Sunrise" | sed -e 's/.*\<dd\>/Sunrise: /' -e 's/<.*//'

Code:
curl --silent "http://weather.yahoo.com/united-states/california/folsom-2404810/" | grep "Sunset" | sed -e 's/.*\<dd\>/Sunset: /' -e 's/<.*//'

Thank you very much...
 
i want to put a calendar and weather in my desktop, im trying to understan everything ut i cannot put.. huhuhu please help me... (by the way im not so good in english so thats why i cannot understand all)

QUESATION:

1. where is the code?
2. where should i paste it?
3 and how??

i already install the geektool on my MACBOOK.

im using macbook white 13 inch!

I just started learning GeekTool myself...yesterday...and in one evening I was able to built a pretty good desktop with GeekTools. It's a lot of cut and paste of previouslywritten "code" or "scripts". So start with the basics.

Here are some starting points for beginners:

1) Download and install Geektool 3.0:

http://projects.tynsoe.org/en/geektool/

2) Download and install Lynx 2.8.7R1(latest):

http://lynx.isc.org/current/

3) Watch all four (4) of the "GeekTool for Dummies" YouTube videos...especially the first three:

http://www.youtube.com/watch?v=0HMg1747OV8&feature=related

http://www.youtube.com/watch?v=JY_6t6bsBuk

http://www.youtube.com/watch?v=uNFkW1lLxtU&feature=related

http://www.youtube.com/watch?v=u2e8VRZvRCY

4) For reference use this beginners guide:

http://thememymac.com/2009/applications/geektool/geektool-all-the-scripts-i-could-find-explained-for-beginners/

The rest is up to you. Practice. Experiment. Some codes can be trial and error. And search this thread for specific "scripts", tips, etc.
 
Applescript colors?

Hi everyone.
First, i would like to thank all the people posting in this forum, now i understand a lot more how geektool, applescript and icalBuddy works.

But i have a question: when youre using applescript, can you have a part of youre script in a different color? Lets say you have an iTunes script, and you want everything white but the artist in red lets say. i used the "geektool for dummies" tutorial on youtube and this is what i have :
Code:
set what to name of current track
any idea?

thanks a lot!

heres my desktop
 

Attachments

  • Screen shot 2010-05-31 at 1.41.14 AM.png
    Screen shot 2010-05-31 at 1.41.14 AM.png
    503 KB · Views: 210
Hi everyone.
First, i would like to thank all the people posting in this forum, now i understand a lot more how geektool, applescript and icalBuddy works.

But i have a question: when youre using applescript, can you have a part of youre script in a different color? Lets say you have an iTunes script, and you want everything white but the artist in red lets say. i used the "geektool for dummies" tutorial on youtube and this is what i have :
Code:
set what to name of current track
any idea?

thanks a lot!

heres my desktop

well I would just use an extra shell geeklet...
code for artist would be
Code:
echo '
tell application "Finder"
	
	if not (exists process "iTunes") then
		return "iTunes is sleeping"
	else if exists process "iTunes" then
		
		tell application "iTunes"
			try
				return artist of current track
				on error
				return "no song is playing"
			end try
		end tell
	end if
end tell' | osascript

and the other stuff
Code:
echo '
tell application "Finder"
	
	if not (exists process "iTunes") then
		return "iTunes is sleeping"
	else if exists process "iTunes" then
		
		tell application "iTunes"
			try
				return name of current track
				on error
				return "no song is playing"
			end try
		end tell
	end if
end tell' | osascript
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.