Currently Being ModeratedMar 15, 2013 8:12 PM (in response to iPhanner)
In AppleScript, using the equal sign in a statement such as temptext = myText tests for equality - it does not assign a value. The set command is used to assign a value to a variable.
Using a repeat statement to check for an album change is also not really the way to go, since it tends to max out your CPU usage - if you create a stay-open application, it will run in the background and the idle handler will be called periodically (the default is every 30 seconds):
property oldText : missing value
on idle -- check periodically
return 30 -- or however many seconds before the next time
on checkAlbum() -- check if the current album name has changed
tell application "iTunes"
if player state is not playing then return
set albumName to (get album of current track)
set myText to text 1 thru 10 of albumName
if myText is not oldText then
set oldText to myText -- update
open location "http://bandsite.com/shows/" & myText