Author Topic: Time based triggers  (Read 3786 times)

gbry

  • Guest
Time based triggers
« on: April 30, 2018, 02:14:26 AM »
Is it possible to set a time everyday as a trigger? For example, at 4 pm everyday it says a TTS phrase, but I can't seem to get this to work, looks like it needs some input from either voice, keyboard, mouse, or joystick.

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: Time based triggers
« Reply #1 on: April 30, 2018, 05:54:54 AM »
Here we go, I just made this one. It seems to work really well.

You say, Set Alarm

A Dialog Box opens, you type in the time for the alarm in the 24 hours format. Example = 0:00:00 - 23:59:59

Another Dialog Box pops up and asked how many seconds should the alarm ring for? Default is 5

After that, the alarm is set and running.

You can say, Alarm Set For? and it will tell you what time you set the alarm for.

If you're wondering if the Alarm is really running, just say, Is Alarm Running?, and it will say, Yes, Alarm is Running. If it's not running, you will get no response.

I've attached the profile below. Give it a try, change it however you like, to suit your needs.
« Last Edit: April 30, 2018, 05:58:22 AM by iceblast »

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: Time based triggers
« Reply #2 on: April 30, 2018, 06:06:28 AM »
Forgot to say, the command is on a infinite loop. It will keep running till it hits the exact time you set the alarm for, and keep going till that time comes again, again, again.

Remember though, if you stop all commands, or close VoiceAttack, or reboot your computer it will kill the alarm and you'll have to reset it.

You could change the command, to save the variable to a txt file, and reload the txt file back into the the variable, and have that happen every time you load the profile. Then it wouldn't forget the time you set it too. :)

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Time based triggers
« Reply #3 on: April 30, 2018, 07:35:55 AM »
Building schedulers into Windows desktop applications is kind of a gamble if you require any level of reliability, as desktop apps have a tendency to be easily shut down (intentionally or otherwise).  Also, building a scheduler into applications would be rather redundant when there is a much (MUCH) more robust and feature-complete scheduler built into Windows already.  What I have been recommending over the years in lieu of building this into VA is to use Windows' Task Scheduler and launch VA with a command line parameter.  Doing so will invoke the command reliably (from a framework that's sole domain is to schedule and in this case is part of Windows), and even launch VA if it is not already running (helps with reliability).  Take a look at the help document in regards to command line parameters to see how that's done.  Hope that helps!

gbry

  • Guest
Re: Time based triggers
« Reply #4 on: April 30, 2018, 08:49:53 AM »
Here we go, I just made this one. It seems to work really well.

You say, Set Alarm

A Dialog Box opens, you type in the time for the alarm in the 24 hours format. Example = 0:00:00 - 23:59:59

Another Dialog Box pops up and asked how many seconds should the alarm ring for? Default is 5

After that, the alarm is set and running.

You can say, Alarm Set For? and it will tell you what time you set the alarm for.

If you're wondering if the Alarm is really running, just say, Is Alarm Running?, and it will say, Yes, Alarm is Running. If it's not running, you will get no response.

I've attached the profile below. Give it a try, change it however you like, to suit your needs.

Technically, this could work, thanks!

gbry

  • Guest
Re: Time based triggers
« Reply #5 on: April 30, 2018, 08:59:47 AM »
Building schedulers into Windows desktop applications is kind of a gamble if you require any level of reliability, as desktop apps have a tendency to be easily shut down (intentionally or otherwise).  Also, building a scheduler into applications would be rather redundant when there is a much (MUCH) more robust and feature-complete scheduler built into Windows already.  What I have been recommending over the years in lieu of building this into VA is to use Windows' Task Scheduler and launch VA with a command line parameter.  Doing so will invoke the command reliably (from a framework that's sole domain is to schedule and in this case is part of Windows), and even launch VA if it is not already running (helps with reliability).  Take a look at the help document in regards to command line parameters to see how that's done.  Hope that helps!

This really helps, however, can we use the task scheduler as well for hourly tasks? Because I see no option in the program.

EDIT: apparently there's an option to repeat every one hour in triggers.

CHEERS!
« Last Edit: April 30, 2018, 09:29:27 AM by gbry »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Time based triggers
« Reply #6 on: April 30, 2018, 09:39:22 AM »
Also, note that the repeat option is a combo box that will allow you to type in your own interval (for example, type in, '1 minute').