Trigger a message/prompt at 00s from the next minute

Discuss RoboTask here
Post Reply
crisp212
Posts: 21
Joined: Mon Dec 04, 2017 7:12 pm

Trigger a message/prompt at 00s from the next minute

Post by crisp212 »

Good afternoon Oleg.

First of all, thanks for answering previous questions. I am getting there to what I want :)

One question: How do I trigger a message/prompt at 00s from the next minute? For example (using previous question about alerts in cities):
So I receive an email with subject “Alert in Chicago” at 17:03:30. I want that the prompt window or message comes out at 17:04:00 exactly and not the moment the loop finds the text (for example at 17:03:32). Is it possible?

Trying a while loop with Date and time where first operand is {Seconds} and second is 00 but if gives me error.

Regards and thank you for your time.


Dan
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Trigger a message/prompt at 00s from the next minute

Post by Oleg »

Look at the example below.
It waits when variable seconds will equal to 0. The task checks the variable in the loop

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1823304062
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task257"
Hide=INTEGER|0
ID=INTEGER|-1540514227
LogOnAsUser=INTEGER|1
Name=STRING|"At 1-st secont on next minute"
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
Action4=FOLDER

[Actions\Action1]
ActionID=STRING|"A_LOOP_WHILE"
Enabled=INTEGER|-1
Name=STRING|"While loop"
Params=FOLDER

[Actions\Action1\Params]
case=STRING|"0"
connection=STRING|"0"
count=STRING|"1"
operator=STRING|"1"
type=STRING|"1"
value1=STRING|"{Seconds}"
value2=STRING|"0"

[Actions\Action2]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay 100 ms"
Params=FOLDER

[Actions\Action2\Params]
delay=STRING|"100"
dimension=STRING|"0"

[Actions\Action3]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"

[Actions\Action4]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""[{Time}.{mSeconds}, {DayOfWeek}, {Date}]"""
Params=FOLDER

[Actions\Action4\Params]
icon=STRING|"1"
msg0=STRING|"[{Time}.{mSeconds}, {DayOfWeek}, {Date}]"
msg1=STRING|"Hey, awake!"
msgcount=STRING|"2"
playsound=STRING|"0"
showmessage=STRING|"1"
Oleg Yershov
crisp212
Posts: 21
Joined: Mon Dec 04, 2017 7:12 pm

Re: Trigger a message/prompt at 00s from the next minute

Post by crisp212 »

Worked :) Thanks Oleg.
Post Reply