How to increase the minutes of some time?
There's no TimeIncMinutes()...
{TimeIncMinutes({Time})}
Re: {TimeIncMinutes({Time})}
Look at my example below.
You can use VB script to create any function.
Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
The function is very simple:
You can use VB script to create any function.
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|341701671
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task256"
Hide=INTEGER|0
ID=INTEGER|-1285742625
LogOnAsUser=INTEGER|1
Name=STRING|"TimeIncMinutes"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""TM"" with value ""{Time}"""
Params=FOLDER
[Actions\Action1\Params]
expand=STRING|"1"
varname=STRING|"TM"
varvalue=STRING|"{Time}"
[Actions\Action2]
ActionID=STRING|"A_SCRIPT_VBEVALUATE"
Enabled=INTEGER|-1
Name=STRING|"VB Evaluate"
Params=FOLDER
[Actions\Action2\Params]
expression=STRING|"TimeIncMinutes(""{tm}"", 15)"
line00000000=STRING|"function TimeIncMinutes(tm, add)"
line00000001=STRING|" TimeIncMinutes = DateAdd(""n"", CInt(add), CDate(tm))"
line00000002=STRING|"end function"
line00000004=STRING|"'logmessage(TimeIncMinutes(Now, ""12""))"
linecount=STRING|"5"
loadfromfile=STRING|"1"
variable=STRING|"aaa"
[Actions\Action3]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Current time: {tm}"""
Params=FOLDER
[Actions\Action3\Params]
icon=STRING|"1"
msg0=STRING|"Current time: {tm}"
msg1=STRING|"Added time: {aaa}"
msgcount=STRING|"2"
playsound=STRING|"0"
showmessage=STRING|"1"
The function is very simple:
Code: Select all
function TimeIncMinutes(tm, add)
TimeIncMinutes = DateAdd("n", CInt(add), CDate(tm))
end function
Oleg Yershov
Re: {TimeIncMinutes({Time})}
Read more about DateAdd function here: https://msdn.microsoft.com/en-us/library/cb7z8yf9(v=vs.84).aspx
Oleg Yershov