PDA

View Full Version : trying to compare url sourcecode in applescript




sinfulboi
Dec 22, 2006, 10:24 PM
hey there im just a newbie to applescript and was wondering if there was a simple way of grabbing the url from an online source and then comparing it to one on my harddrive.

just viewing the source of the page would be a great start so if there is anyone out there who can help me... please... dont be shy ;)



iMeowbot
Dec 22, 2006, 10:31 PM
I don;t think I'd have the patience to make something like that happen in Applescript :p :D

There are two nice little shell commands, curl and diff, that would make this kind of thing really easy. You can run those from Applescript, if you prefer.

sinfulboi
Dec 22, 2006, 10:36 PM
thank you... i spose since i am new to the whole applescript world i am keen to try and do everything in it... but is there no easy way just to save the page source of a url to a file?

mduser63
Dec 23, 2006, 01:01 AM
thank you... i spose since i am new to the whole applescript world i am keen to try and do everything in it... but is there no easy way just to save the page source of a url to a file?

Yes, with curl. You can easily call commands like curl using the AppleScript syntax:

do shell script "put your shell script here"