ark1320 Posted June 25 Report Posted June 25 John, How does the control ipc.control(0x1151) work? Does it automatically detect if auto-save is active and if so, disables it. But if auto-save is disabled, the control will activate auto-save? Or do you write a 1 or 0 with the control to toggle auto-save on and off? Is there a way within a Lua script to detect if auto-save is running (active)? Thanks, Al
John Dowson Posted June 26 Report Posted June 26 9 hours ago, ark1320 said: How does the control ipc.control(0x1151) work? Control numbers are given in decimal, not hex, so the to send the auto-save on/off toggle control you would need to use ipc.control(1151) 9 hours ago, ark1320 said: Does it automatically detect if auto-save is active and if so, disables it. But if auto-save is disabled, the control will activate auto-save? Or do you write a 1 or 0 with the control to toggle auto-save on and off? No. As it says in the documentation (Advanced User manual, page 30): Quote 1151 Auto-Save enable/disable toggle. An additional control to toggle AutoSave on/off. This is only active once the AutoSave functionality has been activated. So auto-save must be active, and then the toggle allows you to enable/disable it. 9 hours ago, ark1320 said: Is there a way within a Lua script to detect if auto-save is running (active)? No, not directly. But as it should always be on when you start a flight (*), you should be able to determine the current state of auto-save by the number of times it has been toggled. * auto-save should always be on when a flight is started, regardless of the state of the auto-save after the previous flight, but I am not sure if this is the case...if not, I would need to correct this. John
ark1320 Posted June 26 Author Report Posted June 26 4 hours ago, John Dowson said: Control numbers are given in decimal, not hex, so the to send the auto-save on/off toggle control you would need to use ipc.control(1151) Yes, of course! Thanks for catching that.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now