Create Alias to URL?

Roger.E.Eller at sealedair.com Roger.E.Eller at sealedair.com
Sun Feb 7 11:24:43 EST 2010


> On Sat, Feb 6, 2010 at 5:14 PM,  <Roger.E.Eller at sealedair.com> wrote:
>>
>> I am using Rev 4.0 on WinXP. The create alias command will work for a
file
>> or a folder, but not a URL to an internet page.
>> If there is no built-in support (yet), what is the best way to script
the
>> creation of a web link file. Should I just store one in a custom
property
>> and write it out to a file when I want to create it?

On Sun, Feb 7, 2010 at 10:14 AM, Bernard Devlin <bdrunrev at gmail.com> wrote:
>
> The problem I see with storing one of these as a file in a custom
> property then saving it on the filesystem with an updated URL, is that
> they seem to contain some UUID.  If you list one in a command window
> using e.g. more, you will see something like this:
>
> [InternetShortcut]
> URL=http://www.google.co.uk/
> IDList=
> IconFile=http://www.google.com/favicon.ico
> IconIndex=1
> [{000214A0-0000-0000-C000-000000000046}]
> Prop3=19,2
>
> Maybe you can just update that URL and the other details won't matter.
>  I notice that when I pasted the above into Notepad and saved it as a
> .url file, that the iconfile being used was an IE icon rather than
> Google's favicon.  When I clicked the shortcut file, it still opened
> in my default browser (which is not IE).  Still, that may not be
> satisfactory.
>
> I don't do much Windows scripting, but I suppose it should be possible
> to create one of these Web Document shortcuts using VBScript.  I did a
> quick search for you and found some sample code:
>
>
http://www.utteraccess.com/forums/printthread.php?Cat=&Board=47&main=1674600&type=thread

>
> This seems to be the bare minimum:
>
> set oUrlLink = WshShell.CreateShortcut(strDesktop & "\Microsoft Web
Site.url")
> oUrlLink.TargetPath = "http://www.yahoo.com"
> oUrlLink.Save
>
>
> Bernard

Thanks Bernard! This is exactly what I needed. From this info I can arrive
at a solution. However, I hope that it will eventually be added to the
create alias command in Rev. I will submit an enhancement request if there
isn't one already.

Roger Eller  <roger.e.eller at sealedair.com





More information about the use-livecode mailing list