|
Try saving the tasklist as Unicode. This should be the default for new tasklists in 6.3.
|
|
|
|
|
Indeed. That solves the issue.
Thanks.
|
|
|
|
|
I'll make sure that Unicode is the default format.
[fixed in 6.3.2]
modified 18-Oct-11 21:17pm.
|
|
|
|
|
Hi All
Just been watching a talk about software innovation and felt the need to re-post some recurring questions:
1. What are the features that ToDoList must have to stay ahead, that it does not currently have?
2. What aspects of ToDoList are good-enough and do not warrant further work?
3. In what areas has ToDoList lost its way?
Please use this thread only for this discussion.
modified 13-Oct-11 23:58pm.
|
|
|
|
|
At first: Thanks once again for your really great application!
In my eyes there is not much left, what can be considered as "must have" - ToDoList is in all aspects not just good enough for my way of work organization but it fits all my needs more than enough ..
ad 1.)
The things I personally miss most
* Possibility to have multiple "Dependencies"
* Posiibility to have multiple "External IDs"
* Possibility to have multiple "File Links"
Things about customization:
* It would be nice, if layout of the panel where the tasks attributes are set (don't know the right name - the part where the attributes are to be edited, just below the task list) - could be modified by user. for example: rearrange wih drag and drop)
* Customize ordering of columns within TreeView/Listview (for example via Drag'nDrop ...)
* In general a few more features for customization of the GUI would be nice (I don't think about Visual Gimmicks like skins - just about the possibility of reordering the current layout ... With this I could adapt the GUI to fit to my priorities ... (for example I often use the "external ID" - and almost ever, when I have to change the "external ID" I have to "search visually" for it, as it "got lost" between the other fields. Another example: I would like to have the "Done%" next to the "Done (Date)" field ....)
ad 2./3.)
From my pont of view, time tracking is a thing I don't use very often - and therefore ToDoList has left "my way" with this features.
JM2C
Wackerstein
|
|
|
|
|
Good ideas all round, but I use the time-tracker every day. When the timer is on, I tend to stay more focused on my current task than when it is off.
|
|
|
|
|
wackerstein wrote: Possibility to have multiple "Dependencies" This is currently supported by delimiting the task IDs using the default regional separator specified in Control Panel.
wackerstein wrote: Posiibility to have multiple "External IDs" It would be (fairly) trivial to support this in a similar way.
wackerstein wrote: Possibility to have multiple "File Links" This is currently supported via the comments field.
wackerstein wrote: customization: I've added it my list of future features.
|
|
|
|
|
.dan.g. wrote: wackerstein wrote: Possibility to have multiple "Dependencies" This is currently supported by delimiting the task IDs using the default regional separator specified in Control Panel. It works! Great. Didn't know that.
But:
The seprator is according to my regional settings the semi-kolon. So what I tried is to put two task IDs in the dependency field of task 5031 (5029; 5030). Then I tried to 'complete' task 5031. ToDoList provides a message then: "...Would you like to see the dependency?" If I click on 'yes' ToDoList selects Task 5029. If I complete that task and go back to task 5031 and try again to mark 5031 as complete I get the same message again and this time ToDoList selects task 5030 if I click on 'yes'.
ToDoList doesn't care about 'priority', 'due date' etc. in this regard and I can imagine that this would be very difficult to implement that.
But would it be possible that ToDoList creates a new little window (after the user has anwered with 'yes' or presents this in the same window) that shows the tasks (including the tasknames, IDs, priority, 'start date' and 'due date') of the tasks task 5031 is depending on and let the user decide what task he wants to see (ToDoList should select).
Showing the task a task depends on would even be useful if it is only one task that task 5031 is depending on.
What do you think?
|
|
|
|
|
1. What are the features that ToDoList must have to stay ahead, that it does not currently have?
a) Dan - I have mentioned it before - but I would want stronger multi user features. The source control option works to a sense - but only for small teams.
b) Custom Fields. I repurpose some fields for other purposes - but in the multi user setup this does not always work very well and sometimes it is difficult to get a field that accepts the right values. Some form of validation (i.e. this field can accept a list of values, this field positive integers, this field a date) would be useful. Multiple entries will also be useful - though I am uncertain how this will be displayed (for example I would like to have the ability to link to multiple files).
c) The ability to add more (and named) Find tasks filters.
d) Synchronisation with Outlook/Google Calendar. I believe this is a key feature for TDL (more important than anything else on this list).
e) A change log (i.e. which tasks was changed in the last x days/hours, by whom (see 1a), and which fields) and the ability to automatically and incrementally (i.e. showing all changes since last change log) export change logs (to a TDL file would be fine, possibly using custom fields of 1b) after a minimum amount of time has passed - please just with a date in the filename so that I can keep multiple copies.
f) Analogous to 1b - the ability to prevent the use of certain fields (obviously a per tasklist setting). Some users re-purpose an unused field which everyone else is hiding - then nobody is aware that this is now in use and that they are not seeing all the data they need. This will not be permanent setting and should be changeable.
g) Supplementary to 1a - automatic tasklist aggregation. Let's say there are 5 teams working on 10 projects but team 1 and 2 is working on project 1, team 1 and 3 on project 2, team 1 and 4 on project 3. Now team 1 needs to have 3 tasklists. What would be easier would be to create separate tasklist - and have an aggregator that combines these tasklists so that team 1 can view their tasks in one go. Making changes to this aggregate tasklist should then sync the changes to the individual tasklists (which would then mean that the other aggregate tasklists for the other teams will also update).
A small thing
h) Storing all tasklist information in the tasklist (including reminders, column settings) - these are stored in the INI file - maybe store them in the tasklist in a per user way (see 1a) as not all users will have the same reminders. DropBoxing a tasklist leads to some unexpedte behaviour - and syncing the INI file leads to more (for example my backup location on a network is not available everywhere...)
2. What aspects of ToDoList are good-enough and do not warrant further work?
a) I do not want to say that it does not warrant further work (because rather says it only requires maintenance as the features change) but TDL's preferences are extensive and it is really easy to customise TDL to behave the way I want. A good IT tool should fit your needs - you should never need to change your way of working to fit an IT tool.
b) Keyboard shortcuts. Yes I have created stuff with AHK (but more to do multiple actions) but TDL is miles ahead with keyboard shortcuts compared to the majority of competitors
c) Exposing internals. This was a big discussion a while back and I am not going to repeat all the arguments here. TDL does a very good job of giving access to some of its internal function (through the menu item IDs). It does make you hungry for more - but very few other programs does this.
d) the listview/treeview mechanism. Most of the editing can be done right in the display mode - whereas many other tasklist programs forces you to open the task and perform editing in a separate screen. Please never change this (I will beg if I have to).
3. In what areas has ToDoListlost its way the environment changed?
a) This is very harsh to say that TDL has lost its way, so I changed the question. Multi platform (and no I am not speaking of Linux/Mac - rather Android/iOS) seems to be the way everything is going. I am not suggesting that you attempt to write an Android version of TDL (as this is most likely be very watered down) - however it is becoming almost a minimum requirement that you have access to your tasklist wherever you go. To this end I believe that Google Calendar integration is becoming (or already?) almost essential.
Dan - feel free to ask me to expand on anything, or even to tell me that something is not what you envisage for TDL. This feedback should not be seen as critique - I will never spend this amount of time giving feedback to a developer unless I think it is a very good program.
H
|
|
|
|
|
Thanks for all your comments.
I will collate them with others' comments and then post a summary suggesting a way forward.
|
|
|
|
|
I don't consider my suggestion as must haves, so I'll lable them as 1.5 (nice to have)
1.5.1 (some) additional customisable (text)fields which I can give any name
1.5.2 more reminders and reminder options (i.e. lets say I have a task (i.e. to take medicine at certain 1.5.3 times) which should give an reminder 4 times a day)
1.5.4 rearrangeable fields (columns) in the tree-/listview
1.5.5 I suck at XML, so an easier way to create reports would be great (simple editor?)
1.5.6 more than one sorting for the tree-/listview columns (i.e. activate main sorting with LMB, additional sortings with CTRL-LMB)
1.5.7 a killer feature for me would be, if there would be a flexible clipboard parser*
*I'm always creating tasks by copying several data fiels from a webpage. It would be a blast if I could simply copy the whole header section of such webpage and TDL parses for certain keywords (i.e. with RegEx) and fills certain fields in TDL with data*. This is what I'm doing manually every day.
*I think an editor would be great for this, which gives the possibility to select which field I want to fill by applying a RegEx which returns the content.
(short) Example:
The webpage header looks like this (I copy the whole header (or webpage?) to the clipboard):
Description: How to parse the clipboard
Reference #: 12345
Blablub : irrelevant data
Blablub 1 : another irrelevant data
Customer : [448321] First Customer [Vienna] (fc@bla.at)
Date : 14-10-2011 09:01
The editor now should give me the option to select which TDL fields I want to fill, and I add the RegEx to get the content. I think it might be useful to select which RegEx GROUP(s) hold the relevant content and which additional text should be used.
I'd give the Editor 4 Fields (Columns). The first is a dropdown box.
TDL Field RegEx Content Result
-------------------------------------------------------------------------------------------
[TaskTitle] Description: (\b.*?$) \1 How to parse the clipboard
[Category] Reference #: (\d+) \1 12345
[AssignedTo] Customer[^\]]+]\s([^\[]+) \1 First Customer
[StartDate] Date\s*?: (\d{2})-(\d{2})-(\d{4}) \3.\2.\1 2011.10.14
.
.
.
-------------------------------------------------------------------------------------------
[Show Results] [OK] [Cancel]
When clicking on the [Show Results] Button, the results are shown. How smart.
edit on: it might be useful to show the whole clipboard content in the editor and add RegEx options like
- dot machtes newlines (auto off)
- case sensitive search (auto off)
- ^$ match at line breaks (auto on)
When showing the whole clipboard, it would be another 'killer feature' if every row in the editor allows to select a color which is used to highlight the found search results in the clipboard. This way it's very easy to 'select' larger areas of text for the comments. Especially if only parts of the webpage should put in the comments field. Looking at this sort of clipboard preview gives a very good overview with differently coloured highlighted areas.
edit 2: load/save of definitions would be nice, too
edit off:
Well Dan, what do you think about this?
Things for your item 2:
2.0 don't change the simple GUI (handling). I just want to WORK with TDL, so I don't need fancy eyecandy which bloats the program and/or reduces usability.
But even without the above improvements, TDL is for me the best tool for tasks. Thanks for it, and thanks for giving it to us for free!
Martin
modified 14-Oct-11 4:13am.
|
|
|
|
|
(cough)AHK(cough)
Very rough but did you think about something like (please note it does not save the date and the category - this would require some small (but easy) transformations - also please backup your target TDL - I make a copy as well - but just in case):
Requires Autohotkey_L
Input =
(LTrim0
Description: How to parse the clipboard`r`n
Reference #: 12345`r`n
Blablub : irrelevant data`r`n
Blablub 1 : another irrelevant data`r`n
Customer : [448321] First Customer [Vienna] (fc@bla.at)`r`n
Date : 14-10-2011 09:01`r`n
)
RegExParser:=Object()
RegExParser[1]:=Object()
RegExParser[1]["RegEx"]:="m)Description: (\b.*?)$"
RegExParser[1]["Output"]:="\1"
RegExParser[1]["Target"]:="TaskTitle"
RegExParser[2]:=Object()
RegExParser[2]["RegEx"]:="Reference #: (\d+)"
RegExParser[2]["OutPut"]:="\1"
RegExParser[2]["Target"]:="Category"
RegExParser[3]:=Object()
RegExParser[3]["RegEx"]:="Date\s*?: (\d{2})-(\d{2})-(\d{4})"
RegExParser[3]["OutPut"]:="\3-\2-\1"
RegExParser[3]["Target"]:="Date"
Gui, Add, Text, xm y+10, TDL Target
Gui, Add, Text, x100 yp , Regular Expression
Gui, Add, Text, x300 yp, Content
Gui, Add, Text, x400 yp, Result
For k, v in RegExParser
{
Target:=v.Target
Gui, Add, Text, xm y+10, %Target%
val:=v.RegEx
Gui, Add, Edit,x100 yp w175 vTarget%k% gUpdate, %val%
FoundPos := RegExMatch(Input, v.RegEx,FoundString)
Result:=v.Output
Gui, Add, Edit, x300 yp w75 gUpdate vOutput%k%, %Result%
StringReplace, Result,Result, \1, %FoundString1%,A
StringReplace, Result,Result, \2, %FoundString2%
StringReplace, Result,Result, \3, %FoundString3%
Gui, Add, Text, x400 yp vResult%k%, %Result%
RegExParser[k]["Result"]:=Result
}
Gui, Add, Button, xm y+10 gSave,Save
Gui, Show
return
save:
Gui, Submit
FileSelectFile, File , 1, , Select Target TDL file, *.TDL
if errorlevel=1
exitapp
if fileexist(File)
{
SplitPath, File, OutFileName, OutDir, OutExtension, OutNameNoExt, OutDrive
FileCopy, %File%, %OutDir%\%OutNameNoExt% (backup %A_now%).tdl
}
else
exitapp
FileRead, xml, %File%
TDL:=loadXML(XML)
NextID:=TDL.childNodes.Item(1).getAttribute("NEXTUNIQUEID")
MyNode:=TDL.createNode(1,"Task","")
For k, v in RegExParser
{
if (RegExParser[k]["Target"]="TaskTitle")
{
MyNode.setattribute("Title",RegExParser[k]["Result"])
}
if (RegExParser[k]["Target"]="Category")
{
MyNode.setattribute("Category",RegExParser[k]["Category"])
}
}
Mynode.setattribute("ID",NextID)
TDL.childNodes.Item(1).appendChild(myNode)
TDL.childNodes.Item(1).setAttribute("NEXTUNIQUEID",NextId+1)
TDL.save(File)
exitapp
Update:
Gui Submit, NoHide
For k, v in RegExParser
{
GuiControl,,Target%k%, % Target%k%
v.RegEx:=Target%k%
FoundPos := RegExMatch(Input, v.RegEx,FoundString)
Result:=OutPut%k%
v.Output:=Result
StringReplace, Result,Result, \1, %FoundString1%,A
StringReplace, Result,Result, \2, %FoundString2%
StringReplace, Result,Result, \3, %FoundString3%
if (result%k%<>result)
GuiControl,,Result%k%, %Result%
RegExParser[k]["Result"]:=Result
}
return
loadXML(ByRef data)
{
o := ComObjCreate("MSXML2.DOMDocument.6.0")
o.async := false
o.loadXML(data)
return o
}
|
|
|
|
|
Thanks. I must admit, I've never used AHK and I'm not familiar with it. But I'll try your example. Of course, I'd more than happy if Dan likes the idea and implements a such an editor (especially a load/save function for various data layouts would be very helpful). But since this would take some time - if done at all, so your solution is much appreciated.
Martin
|
|
|
|
|
In an ideal world it is best that it would be built-in to TDL.exe. Note that mine is not a solution - more a proof of concept of how it can work.
|
|
|
|
|
capital H wrote: In an ideal world it is best that it would be built-in to TDL.exe.
Yep, I'd love to see this feature in TDL.
Martin
|
|
|
|
|
@capital_h:
I'm currently in the process of suggesting TDL to be used in our company. But I want some issues to be 'solved' first. To speed up getting data into TDL, I tried your script, but I cannot get it to work. When starting the script I get a window, but no matter what I copy to the clipboard, the result data does not change (and it seems the input fields are working right to left). Any ideas what I have to change and where, to grab the data from the clipboard (maybe every second or so or by pressing some sort of fetch button)? Or I'm not using the program right...
I tried to post this as PM, but couldn't find the option to do so.
Martin
|
|
|
|
|
realsyntech wrote: Well Dan, what do you think about this? At present I've just added all your comments to my tasklist and then I'll go thru it highighting key phrases before converting those into specific feature requests.
What I'll probably then do is to post a summary of all the requests (abbreviated) together with my take on them all and whether I need others to provide more information or do some investigative work on my behalf.
|
|
|
|
|
Hi Dan,
wackerstein, capital H and realsyntech have already pointed out a lot of very valuable things and I can only agree (minor differences).
1. What are the features that ToDoList must have to stay ahead, that it does not currently have?
a) Calendar
An Outlook-like calendar would be great. A Calendar that can show year, month, week, day.
'Day view' and 'week view' should offer a view on appointments and tasks (I treat appointments like tasks in ToDoList).
To define a task as an appointment (or to show the "start time" and the "end time" of a task) it probably will be necessary to add two editing controls "End Time" and "End Date".
The synchronisation with the Outlook Calendar is definitely a key feature if ToDoList doesn't get his own calendar.
I even consider it a key feature if ToDoList does get his own calendar!
The reason for this is that it will be possible then to work with ToDoList at home, in the office, everywhere (ToDoList is still a portable app). It doesn't make sense to synchronize ToDoList with your Outlook calendar and then go on a business trip and the the calendar remains in the office. Sure the user can bring his computer (Notebook, Netbook) but this is contradictory to the idea of a portable app if the user can't work on other computers, too, isn't it?
Shouldn't ToDoList be self-sustaining?
b) Gantt Viewer
In a way this is just an addition to the views of the calender view options (year, month, week, day). A very useful one.
c) Email-client
A peak in the developement of ToDoList would be an email-client to access the server of the user's provider. Same as Outlook does.
At the end of the day ToDoList would really be self-sustaining and it would be possible to work with ToDoList alone.
(The synchronization option would still be necessary because a lot of people are using Outlook or have to).
d) Links to e-mails in Outlook and the email-client of ToDoList
If ToDoList gets it's own email-client it will be necessary to sychronize the emails between Outlook and ToDoList, too.
e) More than one file link per task (not only in the comments field).
f) Renaming the user defined tools in preferences and changing the order without having to edit ToDoList.ini
g) Marking "parent tasks" who are only serving as headlines (to give the tasklist a structure) somehow so that ToDoList doesn't take them into account when showing the total amount of tasks in the Status Bar.
h) Create new tasks
What I'm really missing is an option (a dialog box) to create a new task and having the opportunity to put in all the informations like taskname, comments, start date, due date, allocated to, external ID etc. etc.
At the moment I help myself by using the command line options -nt and -cm, but I can't access the other editing controls.
Would it be possible to implement such a dialog box or add some command line options?
i) Addtional point:
It would be great if a double click on a tasklist tab (or right mouse click + a context menu) would offer a command to change the name of the tasklist (not the project name, but the name of the file on the HDD.)
2. What aspects of ToDoList are good-enough and do not warrant further work?
"Good enough" is an understatement. Most of the features that ToDoList offers are way beyond competition !!!
But I there's always room for a little improvement, isn't there?
3. In what areas has ToDoList lost its way?
I don't think so !
Cheers,
Jochen
And as always: Thank you for this great program that has made my life so much easier!
modified 17-Oct-11 5:51am.
|
|
|
|
|
1g) Great idea - maybe even have an option to set this behaviour as default (and extend this to my idea around entry validation - child tasks must have due dates - parent tasks due dates is optional)
1h) AHK can maybe help here - will see if I can knock something together - I think that I now have a fairly ok grip on the XML file structure that I am willing to write to it.
|
|
|
|
|
Hi H,
"Parent tasks" as headlines
I gave my main ToDoList a structure by using tasks as headlines like in this example:
O_Organisation
1_Office_Career_Job
2_Me_myself_and_I
3_Subject X
4_Subject Y
...
These "items/headlines" are subdivided, e.g.:
1_Office_Career_Job
* Customers
* Education and training
* Misc
Theses are also headlines.
And then:
'Customers' is again divided:
*company 1
*company 2
Also headlines.
Etc., etc.
I cannot give these "child tasks" "due dates" or "start dates".
Therefore I'd prefer an option that gives the user the opportunity to mark a task as "headline" not matter if this headlins is on the top level or is a child of another headline (or maybe task). This would give the user the chance to combine tasks and informations under one roof: A task can have childs that are actually tasks or have children that are headlines.
Creation of new tasks with a dialog box
capital H wrote: 1h) AHK can maybe help here
At present I have an AHK script that is using the two command line options -nt and -cm and a very simple GUI.
I'd be very grateful if you can "knock something together" (nice expression ) that makes it possible to address the other editing controls, too.
I'm very much looking forward to that. I really do. Thanks in advance.
Cheers,
Jochen
|
|
|
|
|
Sorry when I use the term child tasks I mean tasks that do not child tasks themselves
This way you have
Top level tasks
Parent Tasks (top level tasks can be parents as well though)
Child Tasks (top level tasks can be parents as well though)
TCP_JM wrote: At present I have an AHK script that is using the two command line options -nt and -cm and a very simple GUI.
I'd be very grateful if you can "knock something together" (nice expression ) that makes it possible to address the other editing controls, too.
I'm very much looking forward to that. I really do. Thanks in advance.
Cheers,
Jochen
It wont address the editing controls as it is too difficult to target these directly - what it will do is target the TDL file directly. I started with something but then got a bunch of work - will see if I get some time next week. It is actually remarkably easy to do - what makes it more difficult is the Date fields (because the dates are stored in numeric format) and the categorical fields (allocated to, category etc - since they are stored differently and do not use the actual value) the recurrence field (again stored differently) and probably colours. Once I have done one of each the rest will be easy to add.
Sorry forgot to add - comments will be plaintext only - RTF comments is beyond my capabilities.
Also will only work on unencrypted tasklists.
modified 14-Oct-11 10:53am.
|
|
|
|
|
capital H wrote: child tasks I mean tasks that do not child tasks themselves These can be "headlines" too, of course e.g. if they just carry some informations.
capital H wrote: It wont address the editing controls as it is too difficult to target these directly Well, I tried that and it can "easily" be done if the control you want to address is a control that can be categorised as e.g. "edit251" but I couldn't mangage to address controls like "SysDateTimePick3244" (e.g. 'due date').
capital H wrote: will see if I get some time next week Of course. Take all the time you need.
BTW:
capital H wrote: ...Date fields (because the dates are stored in numeric format) Unfortunately it's not possible to change the creation date manually (column: created). If you find a way to change the creation date alongside while writing the "create a new task with a dialog box" script I'd be grateful, too.
The general idea is to offer a field in the GUI of the creating-a-new-task-script and if the user doesn't put a date in it the script should use the current date. Otherwise it should use the date the user entered in that field. This way it would be possible to create tasks with a creation date that carries a date of the past. Very useful if one wants to transfer older to-do lists (not written in ToDoList) to a ToDoList file.
All the best and have a nice W/E.
|
|
|
|
|
TCP_JM wrote: Unfortunately it's not possible to change the creation date manually (column: created). If you find a way to change the creation date alongside while writing the "create a new task with a dialog box" script I'd be grateful, too.
The general idea is to offer a field in the GUI of the creating-a-new-task-script and if the user doesn't put a date in it the script should use the current date. Otherwise it should use the date the user entered in that field. This way it would be possible to create tasks with a creation date that carries a date of the past. Very useful if one wants to transfer older to-do lists (not written in ToDoList) to a ToDoList file.
This is not in the code below - but should be very easy to add. See code below for what I have at the moment - will be glad if you can test it (please just backup your files before you run it). Currently works by pressing Ctrl+N when TDL is active - but I know you will be able to change that easily.
If you have tested it - I will look at uploading it somewhere and also to expand the fields. Currently I think I am only missing the colour fields and the ability to select multiple categories (e.g. in allocated to - but I am scouring the AHK forum at the moment)
|
|
|
|
|
I'd love to test it, but...
capital H wrote: See code below for what I have at the moment
...where is the code?
|
|
|
|
|
Sorry - laptop ran out of battery - was in a hurry
;Issues
;I do not set the ORDER of the TDL file in the same way as the TDL.exe - New tasks is inserted after the categories - however TDL.exe restores the correct order when next saving - and it only affects human reading of the .tdl in a text editor
;For categorical variables like "Category" and "Allocated To" I cannot get (YET) a dropdownlistcheckbox to enter multiple categories - currently you will be restricted to a single category
;Unicode is untested - but in theory it should work fine for files saved with 6.3.1 - however with files saved with 6.3.0 it may convert it back to ANSI (as the encoding flag was not set)
;Only works with the current active .tdl file - but can be very easily be changed to work with any .tdl file - even closed files or on computers where no AHK is installed
;Requires AHK_L
;Untested with different regional date settings - however I believe that the local date settings in TDL only affects the display and not the saving
;I am not suppressing the dialog box that asks you to reload the tasklist
;Does not recognise default values - though for colours and the like, when left blank it is automatically corrected by TDL
;Cannot handle RichText or encrypted files
;Shared files not locked properly when writing
settitlematchmode,2
#ifwinactive AbstractSpoon
Width2=140
X2=100
^N::
Gui, Destroy
StatusBarGetText, Filename , 1, AbstractSpoon
FileRead, xml, %Filename%
TDL:=loadXML(XML)
Categories:=TDLCategories(TDL, "Category")
TDLCategories(TDL, Category)
{
Categories=
for node in TDL.childNodes.Item(1).childNodes
{
NodeName:=node.nodename
If (NodeName=Category)
for attrib In node.attributes
Categories.=strlen(Categories)>0 ? "|" . attrib.value : attrib.value
}
return Categories
}
DateFormat=dd/MM/yyyy HH:mm:ss
WinGet, HWND, ID, AbstractSpoon
Gui, +ToolWindow -Caption
Gui +owner %HWND%
Gui, Add, Text, xm y+10, TDL Target
Gui, Add, Text, x%X2% yp , Content
;Gui, Add, Text, xm y+10 , Target TDL File
;Gui, Add, Edit, x%X2% yp vFilename w%Width2% r1,%Filename%
;msgbox %Filename%
Gui, Add, Text, xm y+10 , Title
Gui, Add, Edit, x%X2% yp vTitle w%Width2%, New Task
Gui, Add, Text, xm y+10 , Due Date
Gui, Add, DateTime, x%X2% yp vDueDate w%Width2%, %DateFormat%
;Gui, Add, Edit, x100 yp vDueDate
Gui, Add, Text, xm y+10 , Priority
Gui, Add, DropDownList, x%X2% yp w%Width2% vPriority Choose1, <None>|0 (Lowest)|1 (Very Low)|2 (Low) |3 ((Low-Med)|4 (Medium)|5 (Medium)|6 (Medium)|7 (Med-High)|8 (High)|9 (Very High)|10 (Highest)
Gui, Add, Text, xm y+10 , Risk
Gui, Add, DropDownList, x%X2% yp w%Width2% vRisk Choose1, <None>|0 (Lowest)|1 (Very Low)|2 (Low) |3 ((Low-Med)|4 (Medium)|5 (Medium)|6 (Medium)|7 (Med-High)|8 (High)|9 (Very High)|10 (Highest)
;Gui, Add, Edit, x%X2% yp vRisk w%Width2%
Gui, Add, Text, xm y+10 , Cost
Gui, Add, Edit, x%X2% yp vCost w%Width2%, 0.0
Gui, Add, Text, xm y+10 , Category
Gui, Add, ComboBox, x%X2% yp w%Width2% vCategory, %Categories%
Gui, Add, Button, xm y+10 gSave,Save
Gui, Add, Button, x+10 yp gCancel,Cancel
Gui Show
Return
#ifwinactive
Save:
Gui, Submit
FileRead, xml, %Filename%
TDL:=loadXML(XML)
NextID:=TDL.childNodes.Item(1).getAttribute("NEXTUNIQUEID")
MyNode:=TDL.createNode(1,"Task","")
;Save Plain text attribute
MyNode.setattribute("Title",Title)
;Save numbers entered - requires validation - though will not crash if text is entered!
MyNode.setattribute("Cost",Cost)
;Save categorical attribute with FIXED Categories
MyNode.setattribute("Risk",TDLCategory10(Risk))
MyNode.setattribute("Priority",TDLCategory10(Risk))
;Save categorical attribute with VARIABLE Categories - note that only 1 category can be chosen at the moment TDL allows multiple categories
If Category<>
{
MyNode.setattribute("NUMCATEGORY",1)
MyNode.setattribute("CATEGORY",Category)
CategoryIndex:=TDLGetCategoryIndex(Categories, Category)
If CategoryIndex<0
{
MaxIndex:=TDLGetCategoryMaxIndex(Categories, Category)
TDLAddCategory(TDL, "Category", "Category" . MaxIndex, Category)
}
}
;Save a Date
MyNode.setattribute("DueDate",TDLDate(Duedate))
MyNode.setattribute("DueDateString",TDLDateString(Duedate))
;Creation and modification dates are not user editable (well it can be - but I cannot see why you would want to)
TimeNow:=A_Now
MyNode.setattribute("CREATIONDATE",TDLDate(TimeNow))
MyNode.setattribute("CREATIONDATEString",TDLDateString(TimeNow))
MyNode.setattribute("CREATIONDATE",TDLDate(TimeNow))
MyNode.setattribute("CREATIONDATEString",TDLDateString(TimeNow))
MyNode.setattribute("LASTMOD",TDLDate(TimeNow))
MyNode.setattribute("LASTMODString",TDLDateString(TimeNow))
Mynode.setattribute("ID",NextID)
TDL.childNodes.Item(1).appendChild(myNode)
TDL.childNodes.Item(1).setAttribute("NEXTUNIQUEID",NextId+1)
TDL.save(FileName)
Gui, Destroy
;exitApp
return
Cancel:
Gui, Destroy
return
loadXML(ByRef data)
{
o := ComObjCreate("MSXML2.DOMDocument.6.0")
o.async := false
o.loadXML(data)
return o
}
TDLDate(TextDate)
{
EnvSub, TextDate, 19000101, seconds
var1:=TextDate/86400+2
return,%var1%
}
DUEDATESTRING="2011-10-15T11:00"
TDLDateString(TextDate)
{
FormatTime, TDLDateString , %TextDate%, yyyy-MM-ddTHH:mm
return,%TDLDateString%
}
TDLCategory10(TextCategory)
{
if (TextCategory="<None>")
return ""
return SubStr(TextCategory, 1 , InStr(TextCategory," ")-1)
}
TDLAddCategory(TDL, Category, NewCategory, NewCategoryValue)
{
Categories=
for node in TDL.childNodes.Item(1).childNodes
{
NodeName:=node.nodename
If (NodeName=Category)
node.setattribute(NewCategory,NewCategoryValue)
; for attrib In node.attributes
; Categories.=strlen(Categories)>0 ? "|" . attrib.value : attrib.value
}
return Categories
}
TDLGetCategoryIndex(Categories, Category)
{
CategoryIndex=-1
Loop, Parse, Categories, |
{
if (A_LoopField=Category)
CategoryIndex:=A_Index
}
Return CategoryIndex
}
TDLGetCategoryMaxIndex(Categories, Category)
{
MaxIndex:=0
Loop, Parse, Categories, |
MaxIndex:=A_Index
Return MaxIndex
}
|
|
|
|
|