Periodically check website - scriptable?

OK, I know there is probably a way to do this, I just don’t know what it is.

What I want to do is make an Applescript that will run in the background, checking a website maybe once an hour and searching for a certain string. If it finds it, I want it to pop to the foreground an give an alert. Is there an easy way to do this? I’m fairly new to Applescript, but I’ve worked in TI-BASIC and Jython.

Hi,

try this. Change the property-lines to your data, save this script as a stay open application and start it.

property SearchString : "myString"
property theSite : "http://www.mydomain.xyz"

on idle
	try
		do shell script "curl " & theSite & " | grep " & SearchString
		activate me
		display dialog "the String " & quote & SearchString & quote & " was found on site " & return & theSite ¬
			buttons {"OK"} default button 1
	end try
	return hours
end idle

Man, I thought “searching for a string” was vague.