Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Create cross-platform URL shortcut files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create cross-platform URL shortcut files
Authored by: greybird on Jan 29, '04 12:31:22AM

Here is my version, this one keeps full length titles. the main difference is that the title is surrounded by quotes, so bash does not interpret the spaces. The other change is I have two echo statements for better readability.

try
tell application "Safari"
set theURL to URL of (document of window 1)
set theTitle to name of window 1
end tell

do shell script "echo \"[InternetShortcut]\" > ~/Desktop/\"" & theTitle & ".url\""
do shell script "echo \"URL=" & theURL & "\" >> ~/Desktop/\"" & theTitle & ".url\""

on error x
activate me
display dialog x
end try



[ Reply to This | # ]