kimochii69 wrote: Sat Sep 22, 2018 11:24 am
Hello everyone,
I was trying to write some start scripts and I have a question, I wanted to have different scripts called at different times of the day. I know that when you start the script the mistress can tell the time (morning evening night) but is there a way to call a certain script if you log in at, say, 9am?
Thanks
Yes, it should be possible.
But you'd have to have a single start script and a separate folder for the scripts you want to call, inside the
Custom folder for example, like in Miss Blue.
Then you would have to create different variables with different times of the day, like 00:00, 01:00, 02:00...(You can create as many variables as you want depending on the interval you want between two variables. You may want to do this, for example: 00:00, 00:20, 00:40, 01:00, ...).
Then in your start script, using
@CheckDate(), you select the script based on the current time.
This way you will have a different start script every hour(or every 20 minutes if you use the second option).
This is the code to create the variables.(interval 1 hour)
Code: Select all
type 00:00 @InputVar[time_00]
type 01:00 @InputVar[time_01]
type 02:00 @InputVar[time_02]
type 03:00 @InputVar[time_03]
type 04:00 @InputVar[time_04]
type 05:00 @InputVar[time_05]
type 06:00 @InputVar[time_06]
type 07:00 @InputVar[time_07]
type 08:00 @InputVar[time_08]
type 09:00 @InputVar[time_09]
type 10:00 @InputVar[time_10]
type 11:00 @InputVar[time_11]
type 12:00 @InputVar[time_12]
type 13:00 @InputVar[time_13]
type 14:00 @InputVar[time_14]
type 15:00 @InputVar[time_15]
type 16:00 @InputVar[time_16]
type 17:00 @InputVar[time_17]
type 18:00 @InputVar[time_18]
type 19:00 @InputVar[time_19]
type 20:00 @InputVar[time_20]
type 21:00 @InputVar[time_21]
type 22:00 @InputVar[time_22]
type 23:00 @InputVar[time_23]
@EndTease
@End
Once you've created the variables you don't need this script anymore.
Run it by clicking on
Debug>Run script.
If you need a smaller interval I'd suggest to run this script and then copy-paste the variables changing the name and the value with a text editor.
You need this inside your start script.(pay attention to the order of the @CheckDate. You need to start from 23, then 22,... otherwise you will always run the script for midnight)
Code: Select all
@NullResponse @RapidCodeOn
@NullResponse @CheckDate(time_23, line_23)
@NullResponse @CheckDate(time_22, line_22)
@NullResponse @CheckDate(time_21, line_21)
@NullResponse @CheckDate(time_20, line_20)
@NullResponse @CheckDate(time_19, line_19)
@NullResponse @CheckDate(time_18, line_18)
@NullResponse @CheckDate(time_17, line_17)
@NullResponse @CheckDate(time_16, line_16)
@NullResponse @CheckDate(time_15, line_15)
@NullResponse @CheckDate(time_14, line_14)
@NullResponse @CheckDate(time_13, line_13)
@NullResponse @CheckDate(time_12, line_12)
@NullResponse @CheckDate(time_11, line_11)
@NullResponse @CheckDate(time_10, line_10)
@NullResponse @CheckDate(time_09, line_09)
@NullResponse @CheckDate(time_08, line_08)
@NullResponse @CheckDate(time_07, line_07)
@NullResponse @CheckDate(time_06, line_06)
@NullResponse @CheckDate(time_05, line_05)
@NullResponse @CheckDate(time_14, line_04)
@NullResponse @CheckDate(time_03, line_03)
@NullResponse @CheckDate(time_02, line_02)
@NullResponse @CheckDate(time_01, line_01)
@NullResponse @CheckDate(time_00, line_00)
(line_00)
@NullResponse @Call(...Path of the file...)
(line_01)
@NullResponse @Call(...Path of the file...)
...
...
(line_22)
@NullResponse @Call(...Path of the file...)
(line_23)
@NullResponse @Call(...Path of the file...)
@NullResponse @RapidCodeOff
I haven't tested it but it should be working.
Feel free to ask if you have more questions.
Bye!
