Click here to Skip to main content
11,805,035 members (66,250 online)
Click here to Skip to main content
Add your own
alternative version

TDL: Protocol for .dan.g.'s ToDoList, Useful for SVN Users

, 25 Apr 2008 CPOL 38.6K 425 42
Register a fake protocol of TDL: to make tdl:///filename.tdl?tid available
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html">
<title>ToDoList protocol (TDL)</title>
body {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10.5pt;
	margin-bottom: 32px;
h1 {
	font-size: 12pt;
	font-weight: bold;
h2 {
	margin-top: 36px;
	font-size: 11pt;
	font-weight: bold;
	background-color: #FDF0CA;
	border-right: 1px solid #F9DF86;	
	border-bottom: 1px solid #F9DF86;	
	padding: 5px;
hr {
	color: #666666;
	height: 1px;
pre {
	font-size: 10pt;
	margin-left: 2.5em;
	margin-right: 3em;
	background: #F6F6F6;
	padding: 5px;
li {
	margin-top: 5px;
	margin-bottom: 5px;
a:link {
	color: #BA8618;
a:visited {
	color: #B88D1D;
.note {
	background-color: #FFFFEE;
	font-size: 9pt;
	color: #0080FF;
.cmdline {
	margin-left: 2em;
	margin-right: 2em;
	padding: 3px;
	background-color: #F6F6F6;
.button {
	cursor: hand;
	padding-left: 5px;
	padding-right: 5px;
	background-color: #FEF7D8;
	border-right: 1px solid #F9DF86;
	border-bottom: 1px solid #F9DF86;
.content {
    margin-left: 1.5em;
    margin-right: 1.5em;
.totop {
    text-align: right;
    margin-right: 1.5em;
.filename {
	color: #800000;
.hl {
	background: #FFC8C8;
<script language="JavaScript" type="text/JavaScript" src="TdlShell.js"></script>
<script type="text/JavaScript">
function install() {
    var tdl = new TdlShell();
    tdl.wsf = getWsfFile();
    try {
    } catch (err) {
        alert("Install protocol failed!");
    alert("Install protocol successfully!");

function uninstall() {
    var tdl = new TdlShell();
    alert("Uninstall complete.");

function browse() {
	var exefile = document.getElementById("exefile");
    var todolist_exe= document.getElementById("todolist_exe");;
	var filepath = exefile.value;
	if (filepath.match(/.+\.exe$/i) == null) {
		alert("Please browse to find and select the ToDoList's executable file!"
            + "\nNormally it's named TODOLIST.EXE .");
	    todolist_exe.innerText = "(NONE)";
	} else {
	    todolist_exe.innerText = filepath;

function getFile(filename) {
    var filepath = window.location.href;
    filepath = filepath.replace(/(.+)tdl.html.*/i, "$1");
    filepath = filepath.replace(/\//g, "\\");
    filepath = filepath.replace(/^file:\\+/i, "");
    filepath += filename;
    filepath = unescape(filepath);
    return filepath;

function getWsfFile() {
    return getFile("todolist.wsf");

function getIniFile() {
    return getFile("tdl.ini");

function load() {
    var tdl = new TdlShell();
    tdl.ini = getIniFile();
	var exe = tdl.getExecutable();
	if (exe == null) {

    var todolist_exe= document.getElementById("todolist_exe");
	todolist_exe.innerText = exe;

function save() {
    var todolist_exe= document.getElementById("todolist_exe");
	var exe = todolist_exe.innerText;
    if (exe == null || exe == "" || exe == "(NONE)") {
    var tdl = new TdlShell();
    tdl.ini = getIniFile();

    try {
    } catch (err) {

    alert("Save configuration successfully.");
<body style="font-size: 10.5pt">
<h1>ToDoList Protocol (TDL) Readme &amp; Configuration<br>
Script Editoin, Version 1.0 Beta2</h1>
<h2><a name="contents"></a>Contents</h2>
<div class="content">
    <div><a href="#requirement">Requirement</a></div>
    <div><a href="#readme"></a></div>
	<div><a href="#readme">Readme</a></div>
    <div><a href="#install"><strong>Install</strong></a></div>
    <div><a href="#configure"><strong>Configure</strong></a></div>
    <div><a href="#uninstall">Uninstall</a></div>
    <div><a href="#about">About J.Fan.</a></div>
<p class="totop"><a class="button" href="#">Go To Top</a></p>
<h2><a name="requirement"></a>Requirement</h2>
    <li>Windows 2000/XP/2003</li>
    <li><a href="" target="_blank">WSH(Windows Script Host)</a></li>
    <li><a href="" target="_blank"> .dan.g.'s ToDoList </a></li>
    <li>Internet Explorer 6.0+ (only for actions by scripts)
        <div class="note">If your browser is not IE, the script in this page maybe cannot run well. Thus, please folllow the way by manual. </div>
<p class="totop"><a class="button" href="#contents">Contents</a></p>
<h2><a name="readme"></a>Readme</h2>
<div class="content">
    <p>After install ToDoList Protocol, you can use tdl: protocol to open todolist.</p>
    <p>Run the command line in the address bar of <strong>IE</strong>(Internet Explorer) or <strong>Run Dialog</strong>(Start Menu-&gt;Run, or [Win]+[R]):</p>
    <p class="cmdline">tdl:///<span style="color: #FF0000;">tdl_file_path</span>?<span style="color: #FF0000;">task_id</span></p>
    <p><strong>Note</strong>: if the filename contains <u>SPACE</u>, use <u>%20</u> to instead. </p>
    <p class="cmdline">tdl:///C:\My%20Documents\My%20Tasks.tdl?7</p>
    <p>This command will open &quot;C:\My Documents\My Tasks.tdl&quot; and highlight the task whose id is 7; </p>
<p class="totop"><a class="button" href="#contents">Contents</a></p>
<h2><a name="install"></a>Install</h2>
<div class="content">
    <p>To Install TDL: protocol, you should follow several steps: </p>
        <li> Unpack files in the downloaded package to target folder in which you want to install. If you have unpacked the files to a temporary folder, please copy them to your target folder. </li>
        <li>register the protocol. In this step, you can modify registry by manual, or simply click follow &quot;Register TDL &quot; button.
                <li>Register TDL protocol by <u>script</u>: 
                <span class="button" onClick="install();">Register TDL </span></li>
                <li>Register TDL protocol by <u>manual</u>: <br>
				<div>There is a file named <span class="filename">RegTdl.reg</span> in the package. Please use notepad to edit the file and modify its last line.
				    Replace '<span class="hl">{install folder}</span>'
			        to <span class="hl">the folder in witch <span class="filename">todolist.wsf</span> is</span>.
			        Then save the file.
			        Then double click 
			        <span class="filename">RegTdl.reg</span>
			        import it into windows registry.<br>
			        content of <span class="filename">RegTdl.reg</span> is followed. You can also 
			        run 'regedit' to all every key/value by manual. REMEMBER to repalce '<span class="hl">{install folder}</span>' to 
			        <span class="hl">the folder in witch <span class="filename">todolist.wsf</span> is</span>.
Windows Registry Editor Version 5.00

@="\"URL: ToDoList Protocol\""
"URL Protocol"=""



@="wscript.exe \&quot;<span style="color: #FF0000;">{install folder}</span>\\todolist.wsf\&quot; \&quot;%1\&quot;"</pre>
			        <div class="note"><strong>Note:</strong> use '\\' to instead of '\' in the path string. </div>
        <li><a href="#configure">Configue</a> the path of todolist.exe. </li>
<p class="totop"><a class="button" href="#contents">Contents</a></p>
<h2><a name="configure"></a>Configure</h2>
<div class="content">
    <p>Configure ToDoList executable (<span class="filename">todolist.exe</span>) to let TDL protocol can execute it. There are also two way, by script or by manual. </p>
        <li>Configure by <u>script</u>. <br>
            Please click 'Browse' button to find and select installed .dan.g.'s <span class="filename">ToDoList.exe</span>. Then click 'Save' button to save the configuration in <span class="filename">tdl.ini</span>.
                <p>Click <span class="button" onClick="load();">Load Configuration</span> to load existing configuration. </p>
    <p>        Path of ToDoList.exe is: <span id="todolist_exe" style="color: #0066FF;";>(NONE)</span><br>
        <span class="button" onClick="browse();">Browse</span> <span class="button" onClick="save();">Save</span> </p></li>
        <li>Configure by manual.<br>
            Please create/modify the file named 
        <span class="filename">tdl.ini</span> in the folder where <span class="filename">todolist.wsf</span> is. And add/change a line in the file:
        <div class="cmdline">todolist=<span style="color: #FF0000;">{todolist folder}</span>\todolist.exe</div>
        <div>For example:</div>
        <div class="cmdline">todolist=C:\Program Files\Todolist\todolist.exe</div></li>
<p class="totop"><a class="button" href="#contents">Contents</a></p>
<h2><a name="uninstall"></a>Uninstall</h2>
<div class="content">
    <p>Follow below steps to uninstall TDL: protocol:</p>
        <li>Remove &quot;<span style="color: #0066FF;">HKEY_CLASSES_ROOT\tdl</span>&quot; from registry by manual. <br>
            Or simply click this button: <span class="button" onClick="uninstall();">Uninstall for Registry</span> <br>
        If you want to remove the registry key by manual. You can<br>
        run '<u>reg del HKCR\tdl</u>' in Run dialog<br>
        run '<u>regedit</u>' then find and delete the key.        </li>
        <li>Remove all files in TDL install folder (Nomally, it's the folder in which this file is). </li>
<p class="totop"><a class="button" href="#contents">Contents</a></p>
<h2><a name="about"></a>About J.Fan.</h2>
<div class="content">
    <p>J.Fan., James Fancy, is a software engineer from China. He enjoy and fimilar with Java, C++ and some script langurage.</p>
    <p>If you can read Chinese word, <a href="" target="_blank">Here</a> is one of James Fancy's BLOG.</p>
<p class="totop"><a class="button" href="#contents">Contents</a></p>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

China China
James Fancy, is a software engineer from China. He enjoys and familiar with Java, C++ and some script languages.

If you can read Chinese word, here is one of James Fancy's BLOG:

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.151002.1 | Last Updated 25 Apr 2008
Article Copyright 2007 by jamesfancy
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid