Script to check class availability - New to AppleScript

I’m new to AppleScript and am hoping to use it to check course availability on my college web site, http://banweb.jccc.net/student/courses/search/index.php

I’d like to have it submit the form using the keyword “Illustrator” and return a boolean if class is full or not. If a class is available, it’s indicated by a number of seats in the Available column (try searching “Photoshop” for an example). If a class is full it’s indicated by the word Full in the Available column.

I’d like to check availability on a daily basis so when someone drops I can get an open seat. Any ideas on where to start? I’ve figured out getting the URL to load. The search parameter is shown as in HTML source.

Model: MacBook Pro
Browser: Safari 525.27.1
Operating System: Mac OS X (10.5)

I can help by giving you a starting point. To load search results like these, you might want to use the curl command line tool.


do shell script "curl -L -d keyword=photoshop [url=http://banweb.jccc.net/student/courses/search/index.php]http://banweb.jccc.net/student/courses/search/index.php"[/url]

You basically specify each input by starting with the -d flag and then specifying the name and value separated by an equals sign. You end the command with the URL of the form and when run it will give you back the HTML source of the results page.

The problem ist that there’s a whole lot of other hidden inputs that you will need to specify before you get the results your looking for. Take a deeper look at the HTML source of the search page and all its tags.

For more information on curl, open the Terminal application and type man curl