Help with my applescript

Hello all.

i made the following script that creates a http alias desktop shortcut on the desktop for a given url address.

tell application “Finder”
make new internet location file at desktop to ¬” with properties {name:“name of file”}
end tell

is there a way to add some more code on this script so i can add an icon as well (e.g. the safari icon).

Thanks in advance

This should do it. It has the default webloc image:

set startDocumentString to "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"\">
<plist version=\"1.0\">

-- get url, name of new file and container of new file
set urlToOpen to ""
set nameOfNewFile to "A HTTP Alias"
set containerOfNewFile to (path to desktop) as alias

set endDocumentString to "</string>

set dataString to (startDocumentString & urlToOpen & endDocumentString) as string

tell application "Finder"
	if nameOfNewFile does not end with ".webloc" then set nameOfNewFile to (nameOfNewFile & ".webloc") as string
		make new file at containerOfNewFile with properties {name:nameOfNewFile}
		set myFile to (file nameOfNewFile of containerOfNewFile) as alias
		set OA to open for access myFile with write permission
		write dataString to OA starting at 0
		close access OA
	on error theMsg
			close access OA
		end try
		display dialog ("An error occured:" & return & return & theMsg) buttons "OK" default button 1
	end try
end tell

hope it works,