Windows Internet Shortcuts (and can you add support for them!?)
Other browsers including IE do support this.
Whats more Safari does work with Internet Shortcuts dragged onto a tab (although it is believed that this is not a feature of the Browser but of the Operating System provided drag and drop support is enabled in the application one presumes).
Can this be fixed in a future version please?
An example of a Windows (VB)Script (.VBS) that works around the problem is given below (other Windows browsers effectively do this internally but Safari does not):
---BeginningOfScript---
function InternetShortcutURL(arg)
InternetShortcutURL = arg
dim ext
ext = Right(arg, 4)
if UCase(ext) = ".URL" then
dim fso
set fso = CreateObject("Scripting.FileSystemObject")
if (fso.FileExists(arg)) then
dim f
set f = fso.OpenTextFile(arg, 1)
dim lin
lin = ""
do
lin = f.ReadLine()
loop until UCase(Left(lin, 4)) = "URL=" or f.AtEndOfStream
if lin "" then
dim n
n = Len(lin)
if n >= 4 then InternetShortcutURL = Right(lin, n-4)
end if
f.Close()
end if
end if
end function
sub main()
dim cmd
cmd = "C:\Program Files\Safari\Safari.exe"
rem cmd = "C:\Program Files\Safari\Safari.exe -url"
rem WScript.Echo WScript.Arguments.Count
if WScript.Arguments.Count = 1 then
dim url
url = ""
dim arg
for each arg in WScript.Arguments
rem WScript.Echo arg
url = InternetShortcutURL(arg)
next
cmd = cmd & " " & url
end if
rem WScript.Echo cmd
set WshShell = CreateObject("WScript.Shell")
set oExec = WshShell.Exec(cmd)
end sub
main()
---EndOfScript---
Windows XP, Safari 3.1