Hi All,
I'd like to create a Log file for my script, to which output is added throughout the execution of the script,
e.g. something like :-
run script
logfile="C:\mystuff\logs\20140425\log.txt"
OPEN lun, logfile
do stuff..
print logfile "imaging with filter x", at date$
do more stuff..
print logfile "imaging with filter x at ", date$
do more stuff..
reached end of script
print logfile "end of script at ", date$
CLOSE lun
End
Is this possible? None of the text routines seem friendly to this concept...
Regards,
Andrew
www.skippysky.com.au
How to create a continuously updating Log file?
-
- Posts: 253
- Joined: 03 Dec 2018, 22:33
-
- Posts: 253
- Joined: 03 Dec 2018, 22:33
Re: How to create a continuously updating Log file?
Hi,
here is a working example:
here is a working example:
Code: Select all
logFile="C:\temp\mylog.txt"
sub AddLog(line)
AppendText(line + " - " + time() + crlf(), logFile)
end sub
AddLog("imaging with filter x")
AddLog("imaging with filter y")
AddLog("end of script")
-
- Posts: 253
- Joined: 03 Dec 2018, 22:33
Re: How to create a continuously updating Log file?
Fabio,
Was that a script command I missed?
What version of the DLL did that go into?
On the next version of ObservationManager I will switch to using this script command instead of the existing log generation.
The next version will be Version9.06 and the auto script generator will include Dome and roof control in the automation.
I understand you may be thinking about new guiding features to take account of slit spectroscopy. Will this be some new settings in the main program or script commands.
If they are settings it would be nice to have Astroart remember them for startup.
The guiding automation features you added to the script commands are working fine and have solved the reverse polarity switching issue for various az positions > 180.
I only have one minor automation problem now, but have written a good simulator to check the nights observing run, that is Mount flip mid long exposures.
At the moment the long exposure users run the simulator first and check for possible mount flips. Not sure there is any other solution to this. I might do some calculations using exposure time, target alt, az and then calculate time to flip and see if it is shorter than exposure time.
All the best
John
http:\\www.astro.me.uk
AA5ObsMgr yahoo group.
FRAS
Was that a script command I missed?
What version of the DLL did that go into?
On the next version of ObservationManager I will switch to using this script command instead of the existing log generation.
The next version will be Version9.06 and the auto script generator will include Dome and roof control in the automation.
I understand you may be thinking about new guiding features to take account of slit spectroscopy. Will this be some new settings in the main program or script commands.
If they are settings it would be nice to have Astroart remember them for startup.
The guiding automation features you added to the script commands are working fine and have solved the reverse polarity switching issue for various az positions > 180.
I only have one minor automation problem now, but have written a good simulator to check the nights observing run, that is Mount flip mid long exposures.
At the moment the long exposure users run the simulator first and check for possible mount flips. Not sure there is any other solution to this. I might do some calculations using exposure time, target alt, az and then calculate time to flip and see if it is shorter than exposure time.
All the best
John
http:\\www.astro.me.uk
AA5ObsMgr yahoo group.
FRAS
-
- Posts: 253
- Joined: 03 Dec 2018, 22:33
Re: How to create a continuously updating Log file?
Hi John,
that command was added in the interface 5.30.
Internally it works this way: It opens the text file for read/write, appends data to it, then closes the file. Doing so the log file is always in a consistent state and can be accessed by other software.
Clear skies,
Fabio.
that command was added in the interface 5.30.
Internally it works this way: It opens the text file for read/write, appends data to it, then closes the file. Doing so the log file is always in a consistent state and can be accessed by other software.
Clear skies,
Fabio.