Limitations
Doesn't work correctly with small intervalls (less than 30 minutes)
Manual
1. Follow steps 1 - 4 from this tut viewtopic.php?f=12&t=242 taking into account that time estimate is the Edit Field, and StartTime is the Combobox
2. If you want, you could adopt it to the following script viewtopic.php?f=12&t=262
3. Run the script.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Numpad2::
ControlGetText, StartTime, ComboBox40, ahk_exe Todolist.exe
ControlGetText, EstimatedTime, Edit25, ahk_exe Todolist.exe
Regexmatch(StartTime, "(\d+):(\d+)", m) ; HOURS AND MINUTES GET
zolo =.
EstimateTime2 = %EstimatedTime%
EstimateTime2 := Format("{:.2f}", EstimateTime2)
if Regexmatch(EstimatedTime, "(\d).(\d+)", s) and InStr(EstimatedTime, zolo) is true
{
bk = 0.%s2%
bk *= 60
bk := Format("{:d}", bk)
;LESS than 1 hour
if (EstimateTime2 < 1)
{
if (bk = 0)
{
bk = 00
}
Run C:\THEPATH\ToDoList.exe /$(seltid) -st 13:00 -dt 14:00
Sleep 800
Run C:\THEPATH\ToDoList.exe /$(seltid) -dt %m1%:%bk%
}
else
{
OutPutVar1 := m1 + s1 ;hours from start time + time estimate
OutPutVar2 = %s2%
Run C:\THEPATH\ToDoList.exe /$(seltid) -st 13:00 -dt 14:00
Sleep 800
Run C:\THEPATH\ToDoList.exe /$(seltid) -dt %OutPutVar1%:%bk%
}
}
else
;HOURS ONLY
{
Regexmatch(EstimatedTime, "(\d)", b)
OutPutVar3 := m1+b1
Run C:\THEPATH\ToDoList.exe /$(seltid) -dt %OutPutVar3%:00
}