Hello,
I slowly grawl deeper into the possibilities of Astroart.
I tried this script from User Iver (viewtopic.php?f=3&t=351) and it runs fine in simulation but can please somebody explain me this line:
if JD() - LastJD < .01255 then return '15 min = .0104166 20 min = .01255 25 min = .018 30 min = .021
What is JD? What does this line?
Thank you, stay healthy!
kind regards, Dirk
I need help on autofocus script
Re: I need help on autofocus script
Hello, that was a trick to do a task every 20 minutes :
A day (JD) contains 1440 minutes, so for 20 minutes you could also write:
if JD() - LastJD < 20/1440 then ...
where LastJD is a variable that is written when the task if done. So:
Now you can call the subroutine DoSomething whenever you want, with the guarantee that it will never do the task until other 20 minutes are passed. Remember to initialize LastJD at the beginning of the script, at 0 to do the task, or at JD() to skip.
A day (JD) contains 1440 minutes, so for 20 minutes you could also write:
if JD() - LastJD < 20/1440 then ...
where LastJD is a variable that is written when the task if done. So:
Code: Select all
Sub Do_Something_Every_20_minutes
if JD() - LastJD < 20/1440 then return
...
<do your task>
...
LastJD = JD()
End Sub
Re: I need help on autofocus script
Hello,
thank you for the tips.
I will do some tests next rainy day.
Dirk
thank you for the tips.
I will do some tests next rainy day.
Dirk
Re: I need help on autofocus script
Hi Dirk, If you are using AA 7 with the latest service pack the sequence generator can help a lot with scripting. Once you set up the sequence if you go to menu you can select "Create similar script"
and then you only need to add a few custom commands to create your script!
and then you only need to add a few custom commands to create your script!
Iver