Scrabble
01-31-2007, 10:23 PM
Any help would be appreciated. I am having a problem with this script:
if( document.FullName == location.href ) {
alert( "The file is untitled." );
}
else {
WshShell = new ActiveXObject( "WScript.Shell" );
strDesktop = WshShell.SpecialFolders("Desktop");
ShellLink = WshShell.CreateShortcut(strDesktop + "\\" + (document.title) + ".lnk");
ShellLink.TargetPath = location.href;
ShellLink.WindowStyle = 1;
ShellLink.Description = "Shortcut to My File";
ShellLink.WorkingDirectory = strDesktop;
ShellLink.Save();
}
The script seems to generally work fine. However, it seems that it will not create a shortcut on the desktop to some websites (the same ones all of the time). I will list a couple of them below:
http://kodak.com/eknec/PageQuerier.jhtml?pq-path=2/6868&pq-locale=en_US&_requestid=6711
http://www.szgoto.com/doce/products_new.htm
...and then there is the case, like the one below, that one page will create a shortcut and another will not...
This will: http://www.lockergnome.com/nexus/windows/?where=here&s=open+links+in+new+window
This will not: http://www.lockergnome.com/nexus/windows/2006/09/05/survey-of-net-neutrality-editorials-blog-posts/
...and one more scenario -- two different sites create the same shortcut, thus the new shortcut replaces the old one...example below...
http://goto.manufacturer.globalsources.com/si/6008811716771/Showroom/point_id-3000000149681/catalog_id-2000000003844/showroom_type-ALL.htm?diffsupp=prodL4
http://goto.manufacturer.globalsources.com/si/6008811716771/CompanyProfile.htm
Again, any help would be appreciated. Thank you.
if( document.FullName == location.href ) {
alert( "The file is untitled." );
}
else {
WshShell = new ActiveXObject( "WScript.Shell" );
strDesktop = WshShell.SpecialFolders("Desktop");
ShellLink = WshShell.CreateShortcut(strDesktop + "\\" + (document.title) + ".lnk");
ShellLink.TargetPath = location.href;
ShellLink.WindowStyle = 1;
ShellLink.Description = "Shortcut to My File";
ShellLink.WorkingDirectory = strDesktop;
ShellLink.Save();
}
The script seems to generally work fine. However, it seems that it will not create a shortcut on the desktop to some websites (the same ones all of the time). I will list a couple of them below:
http://kodak.com/eknec/PageQuerier.jhtml?pq-path=2/6868&pq-locale=en_US&_requestid=6711
http://www.szgoto.com/doce/products_new.htm
...and then there is the case, like the one below, that one page will create a shortcut and another will not...
This will: http://www.lockergnome.com/nexus/windows/?where=here&s=open+links+in+new+window
This will not: http://www.lockergnome.com/nexus/windows/2006/09/05/survey-of-net-neutrality-editorials-blog-posts/
...and one more scenario -- two different sites create the same shortcut, thus the new shortcut replaces the old one...example below...
http://goto.manufacturer.globalsources.com/si/6008811716771/Showroom/point_id-3000000149681/catalog_id-2000000003844/showroom_type-ALL.htm?diffsupp=prodL4
http://goto.manufacturer.globalsources.com/si/6008811716771/CompanyProfile.htm
Again, any help would be appreciated. Thank you.