|
I've been playing around with the Transforms in order to see if I can get some good XSL files with selections by START Date instead of DUE date. If I get them working, I'll post them.
However, a big stumbling block for me is that the dates don't appear to be exported in ISO format. For example, STARTDATESTRING appears to be m/d/yyyy instead of YYYY/MM/DD (the way it is in the database). And since string functions are so limited in XSL 1.0, I need to convert to numeric to do comparisons. So, it would really help if I could get the dates into ISO format. Then I could easily strip out the "/" or "-" and do numeric comparisons.
Dan ... any chance of getting the TOOLS | TRANSFORM ACTIVE TASK LIST to export the dates differeently in the TRANSFORM function?
Thanks ... Jeff
|
|
|
|
|
Have you tried the preference 'Display dates in ISO format'?
|
|
|
|
|
Duh .... I never even saw that option. Or maybe I did, but thought it applied only to the in-application screens rather than the exported/transformed data.
Thanks Dan for being so understanding of all of us
By the way ... this is the first Project oriented program that my wife and I both find usable. We can tell it's been a labor-of-love for you.
Jeff
|
|
|
|
|
Jeff9315 wrote: my wife and I both find usable
That is praise indeed and I mean that sincerely.
.dan.g.
AbstractSpoon Software
abstractspoon2_at_optusnet_dot_com_dot_au
modified on Wednesday, July 6, 2011 5:44 AM
|
|
|
|
|
Hi Dan,
It's possible to toggle between the two views 'Task Tree' and 'List View' (menu item ID: 33238).
I would like to address the views directely (in an AHK script).
So what I'm looking for are two menu item IDs (one for 'Task Tree' and one for 'List View').
It would be great if you could implement that.
[I'd like to do have the same option regarding 'Task List' and 'Comments'. At the moment it's "only" possible to toggle, too (33243)].
It would be a big help!
Thank you very much in advance.
Cheers,
Jochen
|
|
|
|
|
Jochen
I am not sure what you are asking, but maybe the code below helps:
Essentially it takes the information from the statusbar, of which part is active (tree view list view or comments) This way you can use the Postmessage to perform whatever action you want (for example mapping a switch to TreeView Macro (F8 below)
settitlematchmode,2
StatusBarGetText, StatusBar , 4, AbstractSpoon
#Ifwinactive, AbstractSpoon
F10::
StatusBarGetText, StatusBar , 8, AbstractSpoon ;detects which part is active
if StatusBar = Tasks: Comments
msgbox Comments Active
if StatusBar = Tasks: Task Tree
msgbox Task Tree Active
if StatusBar = Tasks: List View
msgbox List View Active
return
#Ifwinactive, AbstractSpoon
F9::
StatusBarGetText, StatusBar , 8, AbstractSpoon
if StatusBar = Tasks: Comments
PostMessage, 0x111, 33243 ;Comments are active toggle
if StatusBar = Tasks: Task Tree
PostMessage, 0x111, 33238
if StatusBar = Tasks: List View
PostMessage, 0x111, 33238
;msgbox, %statusbar%
return
#Ifwinactive, AbstractSpoon
F8::
StatusBarGetText, StatusBar , 8, AbstractSpoon
if StatusBar = Tasks: Comments
{
PostMessage, 0x111, 33243 ;Comments are active toggle
sleep,100
}
StatusBarGetText, StatusBar , 8, AbstractSpoon
if StatusBar = Tasks: List View
PostMessage, 0x111, 33238 ;switch to tree view
return
Hope it helps
|
|
|
|
|
Thx cH, I was going to suggest something similar (but without the helpful script).
|
|
|
|
|
.dan.g. wrote: I was going to suggest something similar Do it, please
|
|
|
|
|
Hello 'capital H',
thank you very much. The code sure will help.
The only question that comes to my mind is (before I tested it ['talking about the code) ]:
Will it work too, if the 'status bar' is not visible? (menu: view/show status bar).
If the answer to that question is NO: is there another option to get the information which part is active (tree view, list view, comments)? [1]
Cheers,
Jochen
P.S.
[1] We'll have to take the information from the title bar then, right?
Would 'TitleBarGetText, TitleBar , 8, AbstractSpoon' etc. be correct then?
I still have to find out what the numbers (8, 4, etc.) are about
modified on Tuesday, July 5, 2011 1:46 AM
|
|
|
|
|
Well to answer your first question:
Luckily for us Dan only hides his status bar (thanks Dan!), but continues to update the text on the statusbar, even though it is hidden. This means that the statusbar method will work regardless.
BTW if you wanted to get the information from the Title of the window, I would suggest:
WinGetActiveTitle, OutputVar ;since we already know that TDL is active, because of the #Ifwinactive
and to search if the appropriate text is in there. However this will only work if the status bar is hidden
BTW (2)
How statusbargettext works:
StatusBarGetText, StatusBar , 8, AbstractSpoon
the 8 refers to the segment of the statusbar. Open your TDL window, and start counting from the left. You will see that the 8th segment contains which part of the view is active (comments/tree/list). Sorry for the confusion with the 4, I copied it from the RegEx Mailto replacer - where I had to check which task ID is active - and I forgot to delete it (you will notice I never use that Statusbar variable before it is overwritten)
|
|
|
|
|
capital H wrote: Luckily for us Dan only hides his status bar (thanks Dan!), but continues to update the text on the statusbar, even though it is hidden
This is one of those notorious situations where users take advantage of un-documented features that subsequently must be maintained so as not to break those user-apps.
However since ToDoList doesn't eat at the same cafeteria as MSProject I've probably got nothing to worry about...
|
|
|
|
|
It's not a bug it's a feature!
Although even if you do change it there is a way around it (check if statusbar is visible, grab from statusbar if visible, grab from wintitle if not)
|
|
|
|
|
Hi Dan,
some time ago capital H was kind enough to explain to me how the command 'StatusBarGetText' works and he explained too that you (luckily for us) only hide the status bar, but continue to update the text on the statusbar, even though it is hidden.
You answered to him that "this is one of those notorious situations where users take advantage of un-documented features that subsequently must be maintained so as not to break those user-apps."
He answered that it's a feature not a bug, and I second that.
Things like 'StatusBarGetText, VariableXYZ, 8, AbstractSpoon' are still working like a charm. It works with 7,3,4 etc., too.
But one thing changed: StatusBarGetText, NameOfTasklist, 1, AbstractSpoon.
This does not work anymore since you've put the load/save progress bar in the StatusBar and the StatusBar is not visible.
Doesn't the text in the StatusBar get updated anymore if the StatusBar is hidden?
The command 'StatusBarGetText, VariableXYZ, 1, AbstractSpoon' is very vital to me.
I'm running a few scripts that are creating new tasks in specific lists.
The "little magic thing" about this is that I do not have to change the list I'm working with. A new idea doesn't interrupt the workflow that way.
For example:
If I'm working in Tasklist A or C, and list B is open too, I can run a script that creates a new task in list B (the script sets the focus to list B, creates a new task) and returns to the list A or C or ... or ... (whatever list I'm working with).
So it is necessary that the VariableXYZ gets the information from the StatusBar. Otherwise it can't send it back to the return command and the script stops after putting in the new task in list B.
Thank you very much for your help in advance.
Cheers,
Jochen
|
|
|
|
|
Jochen - I cannot reproduce this with 6.3.1
Tried Unicode + Ansi and after loading a new tasklist - StatusBarGetText, NameOfTasklist, 1, AbstractSpoon still works for me. I even restarted TDL.exe
Is there something that I am missing?
|
|
|
|
|
Hi H,
capital H wrote: I cannot reproduce this with 6.3.1 Hmmm... I have to admit that I didn't test it with 6.3.1. At present I always enable the view of the StatusBar.
I'll have to test it again with the newest version of ToDoList. Maybe Dan has solved it without telling us. I mean: it's a "un-documented feature" according to Dan
I'll get back to you asap.
|
|
|
|
|
Hi H,
capital H wrote: I cannot reproduce this with 6.3.1 Seems that the problem with '1' in StatusBarGetText, NameOfTasklist, 1, AbstractSpoon is solved if the StatusBar is not visible.
The "create-a-new-task-in-a-specific-list-and-return-to-the-list-I-was-working-in" scripts work with 6.3.1. whether the view of StatusBar is enabled or not. Very good.
My "Recycle-bin" script doesn't work (I still get sometimes the window that asks me what language I want to use. It's like if you make a fresh install of ToDoList) but I'm willing to believe now that this is due to my bad coding. )
|
|
|
|
|
Hi H,
maybe I rejoiced too soon when I wrote: "Seems that the problem with '1' in StatusBarGetText, NameOfTasklist, 1, AbstractSpoon is solved if the StatusBar is not visible."
So I wrote a little script to test it:
SetTitleMatchMode, 2
WinWaitActive, AbstractSpoon
StatusBarGetText, File , 1, AbstractSpoon
StatusBarGetText, Taskcount , 3, AbstractSpoon
StatusBarGetText, Taskselection , 4, AbstractSpoon
StatusBarGetText, View , 8, AbstractSpoon
MsgBox, ,%File% ,`nFiltered task count / Total task count: %Taskcount% `n`n`n%TaskSelection% | %View%,
I'm running this script as a 'user defined tool'.
First test:
StatusBar is visible. Run the script, please.
You get a little window that gives you informations about 'filtered task count /total task count' etc.
Now change the filter. Let's say from 'A) All tasks' to 'B) Incomplete Tasks'.
Run the script again. The window created by the script will show different task numbers.
It can easily be seen that the script window shows the correct numbers (according to the filters= since the StatusBar is visible.
Second test:
Hide the StatusBar. Same test as above.
But this time the window created by the script will not show the correct numbers after the change of the filter option.
So it seems that the a) ToDoList doesn't update the StatusBar if it is hidden or b) the script is not able to read the informations of the hidden StatusBar.
Thanks for your reply in advance.
Cheers,
Jochen
|
|
|
|
|
I definitely did make a change that solved 'some' of the problem but I may have missed something. I'll have another look.
[more]
The problem is due to the default behaviour of the development library that I am using - hidden UI elements do not get notified to update themselves. I shall have to explore alternatives.
ps. But at least the major issue is fixed, that of what element has the focus
[/more]
modified 20-Oct-11 2:39am.
|
|
|
|
|
.dan.g. wrote: I'll have another look.
|
|
|
|
|
Hi Dan,
I'm a little confused now:
When capital H wrote: "...Dan only hides his status bar (thanks Dan!), but continues to update the text on the statusbar, even though it is hidden." you called this an un-documented feature.
Capital H's statement was that the UI element (StatusBar) gets updated when it is hidden and you confirmed this by saying it is an an un-documented feature.
Now you are saying:
.dan.g. wrote: <layer>The problem is due to the default behaviour of the development library that I am using - hidden UI elements do not get notified to update themselves.
Could you tell me please how these two statements can be looked at so I can see that both are "true"? Is it possible that a thing is completely black and completely white at the same time? What do I miss?
Thanks for your answer in advance.
Cheers,
Jochen
modified 20-Oct-11 7:08am.
|
|
|
|
|
TCP_JM wrote: When capital H wrote: "...Dan only hides his status bar (thanks Dan!), but continues to update the text on the statusbar, even though it is hidden." you called this an un-documented feature.
Capital H's statement was that the UI element (StatusBar) gets updated when it is hidden and you confirmed this by saying it is an an un-documented feature.
I think what is happening is that parts of the statusbar gets updated (even when hidden) and parts does not get updated.
Using the code below it seems only part 1 and part 8 is updated
part 2 - not needed in AHK can get from file
part 3 - total tasks - can get from file - filtered tasks - cannot get from file (but do you need it)
part 4 - can get via clipboard
part 5 can get via clipboard
part 6 can get via clipboard
part 7 can get via clipboard
part 8 is updated
For me part 1 and part 8 is critical - the rest I can either get or have no idea what I would want to do with it (in AHK - the number of filtered tasks)
settitlematchmode,2
#persistent
settimer, update,100
update:
StatusBarGetText, part1 , 1, AbstractSpoon
StatusBarGetText, part2 , 2, AbstractSpoon
StatusBarGetText, part3 , 3, AbstractSpoon
StatusBarGetText, part4 , 4, AbstractSpoon
StatusBarGetText, part5 , 5, AbstractSpoon
StatusBarGetText, part6 , 6, AbstractSpoon
StatusBarGetText, part7 , 7, AbstractSpoon
StatusBarGetText, part8 , 8, AbstractSpoon
traytip %FileName%,part1: %part1%`npart2: %part2%`npart3: %part3%`npart4: %part4%`npart5: %part5%`npart6: %part6%`npart7: %part7%`npart8: %part8%
return
|
|
|
|
|
capital H wrote: I think what is happening is that parts of the statusbar gets updated (even when hidden) and parts does not get updated. You are probably right. But the latest message of Dan (="hidden UI elements do not get notified to update themselves") sounds like "no part gets updated". But that's obviously not right.
I already asked Dan if he could clarify this because I can't align his two different statements (hidden feature vs. not updated).
capital H wrote: For me part 1 and part 8 is critical Absolutely!
The "rest" should work, too. You never know what you can use them for. Just an idea that crosses my mind:
Let's assume that somebody wants to write a report (and Dan ads the feature that parent tasks who are just containers/headlines can be marked as headlines so that ToDoList doesn't take them into account anymore) and wants to put automatically the number of equally important tasks in that report ...
The good old Boy-Scout motto: Be prepared.
modified 20-Oct-11 12:40pm.
|
|
|
|
|
For your script to work for me I had to change your last line to
MsgBox, %File% ,`nFiltered task count / Total task count: %Taskcount% `n`n`n%TaskSelection% | %View%,
(This may be because I use AHK_L - do not know though)
Running your tests I get the same result - Taskcount and Taskselection does not update
However File and view updates for me when I change the views or when I change the open file(switching or opening a new file)
Using 6.3.1 AHK_L (should not make a difference) and Windows XP.
Does not make a difference if I run it as a tool or from explorer.
No the question that arises is - do you need the number of tasks shown ?
(note that you can get the ID of the currently selected task via the clipboard - and that will even work with multiple selections)
Just FYI - my code that I used below - I used traytip and settimer - this way you do not need to run the file 20 times...
settitlematchmode,2
#persistent
settimer, update,100
update:
StatusBarGetText, Filename , 1, AbstractSpoon
StatusBarGetText, Taskcount , 3, AbstractSpoon
StatusBarGetText, Taskselection , 4, AbstractSpoon
StatusBarGetText, View , 8, AbstractSpoon
traytip %FileName%,Filtered task count / Total task count:`t%Taskcount% `n%TaskSelection%`n%View%
return
|
|
|
|
|
capital H wrote: Running your tests I get the same result - Taskcount and Taskselection does not update Reassuring
capital H wrote: No the question that arises is - do you need the number of tasks shown ? Not necessarily. (I once had the idea that if I do not see the StatusBar and filter my tasklist (I do that by using AHK scripts a lot) to display a little window that shows the amount of tasks that are shown after using a specific filter, but I don't do that.) In this case the idea was just to test whether the StatusBar gets updated when it's hidden or not. I wanted to test several parts since part 1 seemed to work.
I do not need 'est', 'spent' and 'cost'. I'd display the StatusBar if I could get rid of these or if I could substitute them with another info like PID (Parent ID) or something else.
capital H wrote: Just FYI - my code that I used below - I used traytip and settimer - this way you do not need to run the file 20 times... Thank you. I'm always grateful if I can learn from you.
capital H wrote: (note that you can get the ID of the currently selected task via the clipboard - and that will even work with multiple selections) You make my my mouth water
|
|
|
|
|
Thank you very, very much.
With this knowledge it should be possible to achieve what I want to to.
Thanks again.
Cheers,
Jochen
|
|
|
|
|