General
: K-Meleon Web Browser Forum
General discussion about K-Meleon
Your IP address, domain or ISP has been blocked. Please contact the forum administrators.
Go to:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=666] Thanx kko!!! So the full script is: if (WScript.Arguments.length) { function Sanitize(string) { // replace invalid characters by whitespaces var invalid = new Array(/\*/g,/"/g,/</g,/>/g,/\|/g,/\\/g,/\//g,/:/g,/\?/g); for (var j in invalid) string = string.replace(invalid[j]," "); return string; } var Arg = WScript.Arguments; var WSS = new ActiveXObject("WScript.Shell"); var FSO = new ActiveXObject("Scripting.FileSystemObject"); var LnkName = (Arg.length > 1) ? Sanitize(Arg(1)) : "New Internet Shortcut"; var LinkLoc = WSS.SpecialFolders("Desktop") + "\\"; var i=0; for (; FSO.FileExists(LinkLoc+LnkName+((i)?(" ("+i+").url"):".url")); i++); LnkName += (i) ? (" ("+i+").url") : ".url"; var Lnk = WSS.CreateShortcut(LinkLoc+LnkName); Lnk.TargetPath = Arg(0); Lnk.Save(); } Works great! Had to put all files from my desktop that I wanted to keep in a folder, close explorer, and purge my desktop with del *.* to get rid of the ghost shortcut, but it's gone now. I guess the only way to improve the script now is to put it all in an installer that copies the .js to the right place and plugs the right bits into the .cfg files, then drop it on [url=http://kmeleon.sourceforge.net/wiki/index.php?id=KPlugins]http://kmeleon.sourceforge.net/wiki/index.php?id=KPlugins[/url] : )[/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
FAQ
English