12-30-2022, 05:03 AM
Use "TIMER" function to keep track of how much time is being spent. Use "RUN" to launch another EXE file. But have you been doing this already? Oh no, if this is the case what else is M$ breaking in "Win-does-not One One"?
If you need to preserve data between runs of the same program that is yours, you'll have to save the data into a file so it could be read back on the next try, otherwise you're out of luck. "CHAIN" and "COMMON SHARED" aren't supported like 16-bit, there are too many security implications involved and some people like to do the sort of thing while online, that you're asking for.
You could still come up with a QB64 program that works as timer, to manage the "automatic" program runs but there's no control over the data sharing if you don't have the source code for the EXE file of the program you want to start and restart.
If you simply cannot have two instances of the same program, one trying to end its session while the other one is starting, then it's possible to check in memory for the program residing there but it requires strong Win API stuff. Maybe it's the same as in Linux, asking the program politely to finish, before starting a new session with it. Sometimes however the program refuses to finish because it hung up...
If you need to preserve data between runs of the same program that is yours, you'll have to save the data into a file so it could be read back on the next try, otherwise you're out of luck. "CHAIN" and "COMMON SHARED" aren't supported like 16-bit, there are too many security implications involved and some people like to do the sort of thing while online, that you're asking for.
You could still come up with a QB64 program that works as timer, to manage the "automatic" program runs but there's no control over the data sharing if you don't have the source code for the EXE file of the program you want to start and restart.
If you simply cannot have two instances of the same program, one trying to end its session while the other one is starting, then it's possible to check in memory for the program residing there but it requires strong Win API stuff. Maybe it's the same as in Linux, asking the program politely to finish, before starting a new session with it. Sometimes however the program refuses to finish because it hung up...