A place to post your ideas and solutions for how best to make use of the software
Moderators: abstr, Niko
-
Niko
- Posts: 239
- Joined: Wed Sep 18, 2019 6:48 am
Post
by Niko » Sun Nov 03, 2019 10:31 am
If you have a bunch of Full-day tasks and you want to move these task to a specific time period by mouse you need to do the following steps:

- Old.gif (121.83 KiB) Viewed 7402 times
It takes Really much time and causes a lot of inconveniences.
This simple UDT code allows you to move a selected task to a specified in advance time interval.
Here is the animation showing how this code works.

- New.gif (254.44 KiB) Viewed 7402 times
-
abstr
- Site Admin
- Posts: 370
- Joined: Sun Jul 28, 2019 12:22 pm
Post
by abstr » Mon Nov 04, 2019 12:11 am
Clever!
-
Niko
- Posts: 239
- Joined: Wed Sep 18, 2019 6:48 am
Post
by Niko » Mon Nov 04, 2019 9:26 am
Thank you. Of course it's a pseudo drag-n-drop function, but it helps a lot, especially if it's assigned to a hotkey.
-
Niko
- Posts: 239
- Joined: Wed Sep 18, 2019 6:48 am
Post
by Niko » Thu Nov 07, 2019 6:14 pm
Update 0.1.
By default, this script places a task to a given interval, in this case from 1 PM to 2 PM. If you want to add or move a task to 10 - 11 PM, you still need to scroll to the top to get the task. The temporary solution is to add another script which places a task to another time interval
The first script
The second script
In the next version I will try to link the time in the script to the position of the scroll bar (top - middle - low) via AutoHotKey.
-
Niko
- Posts: 239
- Joined: Wed Sep 18, 2019 6:48 am
Post
by Niko » Fri Nov 08, 2019 8:53 am
Update. AHK Version of the script.
I only press a hotkey (as seen from the below animation it's Num 2) and the tasks are automatically moved to the given time intervals.

- AHK.gif (347.51 KiB) Viewed 7341 times
Code: Select all
Numpad2:: ;choose a hotkey
ControlGetPos Cx, Cy, w, h, WindowsForms10.SCROLLBAR.app.0.297b065_r40_ad11, ahk_exe Todolist.exe ;Get the height and width of the scrollbar
Bx = %Cx%
Bx += 1 ;avoid tiny white lines
By = %Cy%
By += 25 ;avoid tiny white lines
Dx = %Cx%
Dy = %Cy%
Dx += %w%
Dy += %h%
PixelSearch, Sx, Sy, %Bx%, %By%, %Dx%, %Dy%, 0xcdcdcd,, Fast
if Sy < 400
Run C:\THEPATHtoTDL\ToDoList.exe /$(seltid) -st 9:00 -dt 10:00
else
Run C:\THEPATHtoTDL\ToDoList.exe /$(seltid) -st 18:00 -dt 19:00
-
Niko
- Posts: 239
- Joined: Wed Sep 18, 2019 6:48 am
Post
by Niko » Sun Dec 01, 2019 8:14 am
Update.
To move the selected task back to the full-day tab use this udt command (for a today task):
Code: Select all
-sd "$(todaysdate)" -dd "$(todaysdate)"
-
Mikro
- Posts: 53
- Joined: Mon Jul 29, 2019 2:09 pm
Post
by Mikro » Tue Dec 03, 2019 9:37 am
Hey Niko,
thank you very much for sharing this tweak. I would like to implement that because have this usecase quite frequently.
I'm not so proficient coding unfortunately.
Could you line out how to implement your feature step by step
thank you!
cheers
Mikro
Niko wrote: ↑Fri Nov 08, 2019 8:53 am
Update. AHK Version of the script.
I only press a hotkey (as seen from the below animation it's Num 2) and the tasks are automatically moved to the given time intervals.
AHK.gif
Code: Select all
Numpad2:: ;choose a hotkey
ControlGetPos Cx, Cy, w, h, WindowsForms10.SCROLLBAR.app.0.297b065_r40_ad11, ahk_exe Todolist.exe ;Get the height and width of the scrollbar
Bx = %Cx%
Bx += 1 ;avoid tiny white lines
By = %Cy%
By += 25 ;avoid tiny white lines
Dx = %Cx%
Dy = %Cy%
Dx += %w%
Dy += %h%
PixelSearch, Sx, Sy, %Bx%, %By%, %Dx%, %Dy%, 0xcdcdcd,, Fast
if Sy < 400
Run C:\THEPATHtoTDL\ToDoList.exe /$(seltid) -st 9:00 -dt 10:00
else
Run C:\THEPATHtoTDL\ToDoList.exe /$(seltid) -st 18:00 -dt 19:00
-
Mikro
- Posts: 53
- Joined: Mon Jul 29, 2019 2:09 pm
Post
by Mikro » Mon Dec 16, 2019 10:30 am
Hi Dan, Niko,
if I pasted your code in a UDT like so:

- UDTdef.png (33.62 KiB) Viewed 7186 times
and execute it I get this error:

- TdlError.png (4.31 KiB) Viewed 7186 times
But according to the taskmanager only one ToDoList instance is running.

- TaskTdl.PNG (10.03 KiB) Viewed 7186 times
Any idea what I am missing?
thx
Mikro
-
Mikro
- Posts: 53
- Joined: Mon Jul 29, 2019 2:09 pm
Post
by Mikro » Tue Dec 17, 2019 9:30 am
Update:
Also tried the AHK Version, but still get the errormessage concerning multiple ToDoList instances.
-
Niko
- Posts: 239
- Joined: Wed Sep 18, 2019 6:48 am
Post
by Niko » Thu Jan 09, 2020 8:02 pm
Hi, Mikro.
Sorry for the late reply.
Does the error appears when "Multiple instances of TODOLIST" is unchecked in the menu?