I just saved it as as a application and it works here.Here is the apple script 
below.
try
        tell application "Safari"
                activate
                set theURL to URL of (document of window 1)
                set theTitle to name of window 1
        end tell
        set theTitle to first word of theTitle
        set res to "[InternetShortcut]
URL=" & theURL
        
        do shell script "echo \"" & res & "\" > ~/Desktop/" & theTitle & ".url"
        say "Web shortcut " & theTitle & " was created on your desktop."
on error x
        activate me
        display dialog x
end try
On Dec 18, 2010, at 12:25 PM, Sarah Alawami wrote:

> Nope I got a error here.
> 
> script source edit text       tell application "Safari"
> error 
> 
> the code looks right so why will it not compile?
> On Dec 18, 2010, at 11:55 AM, louie wrote:
> 
>>      tell application "Safari"
>>              activate
>>              set theURL to URL of (document of window 1)
>>              set theTitle to name of window 1
>>      end tell
>>      set theTitle to first word of theTitle
>>      set res to "[InternetShortcut]
>> URL=" & theURL
>>      
>>      do shell script "echo \"" & res & "\" > ~/Desktop/" & theTitle & ".url"
>>      say "Web shortcut " & theTitle & " was created on your desktop."
>> on error x
>>      activate me
>>      display dialog x
> 
> Sarah Alawami
> 
> MSN: [email protected]
> 
> Website: http://music.marrie.org
> youtube: http://youtube.com/marrie125
> podcast: http://marrie.podbean.com
> podcast mobile http://marrie.podbean.com/mobile
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "MacVisionaries" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/macvisionaries?hl=en.
> 

louie
[email protected]



-- 
You received this message because you are subscribed to the Google Groups 
"MacVisionaries" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/macvisionaries?hl=en.

Reply via email to