Re: Scripting creation of Internet clippings
Re: Scripting creation of Internet clippings
- Subject: Re: Scripting creation of Internet clippings
- From: Andy Wylie <email@hidden>
- Date: Wed, 09 May 2001 13:41:05 +1200
on Wednesday, 9 May 2001 5:51:43 AM Roger Howard wrote:
>
Has anyone come up with a more direct way of creating Internet Clipping files
>
from a url string...
this handler uses Akua's 'a new file' and Satimage's 'PutResource'
------------------------
on doMake(theTitle, theURL,theFold)
if (length of theTitle) > 31 then set theTitle to (text 1 thru 31 of
theTitle)
if theURL contains "@" then
set thetype to "ilma"
set theURL to "
mailto:" & theURL as string
else if theURL contains "ftp:" then
set thetype to "ilft"
else
set thetype to "ilht"
end if
try
a new file in theFold named theName of type thetype with creator "drag"
set myFile to the result as alias
PutResource "TEXTurl" to myFile type "drag" index 128 with name ""
PutResource theURL to myFile type "url " index 256 with name ""
PutResource theURL to myFile type "TEXT" index 256 with name ""
on error m number n
error {m, n}
return 128
end try
end doMake
_______________ Andy