After that is done, usually I have I have to make each task dependent to the higher one manually, that takes much time, especially when you have more than 10 elements.
This script allows you to make each task below dependent on the task above it. All you need to do is to input in the console the ID of the first and the last tasks.
TESTING ADD NEW TASKS using loops THE WORKING SOLUTION
Code: Select all
import os
from time import sleep
# %% markdown
# # Input Values (Task Numbers 110-120)
InptStartID = int(input("Input ID of the first task"))
InptEndID = int(input("Input ID of the last task"))
listnewStart = []
listendFinish = []
# %% markdown
# # Make Lists
for z in range (InptStartID,InptEndID+1):
(listendFinish.append(z))
print (listendFinish)
for x in range (InptStartID+1,InptEndID+1):
(listnewStart.append(x))
print (listnewStart)
# %% markdown
# # Input Values (Task Numbers 110-120)
for i, j in zip(listnewStart, listendFinish):
#print (i,j)
pathtotdl = "C:/{ThePathToTDL}/ToDoList.exe /$(seltid)"
variables1 = " -tid "
variables2 = " -dp "
cmd = pathtotdl+variables1+str(i)+variables2+str(j)
sendcommand = os.system(cmd)
sleep(1)