Hi
I am using my laptop in several locations each day and that requires restarts. How can I either:
1. use say shift key to over ride the startup script running or
2. log the fact that it has run once, earlier that day so it does nto run again (until the next day)
TIA/gary
Over-ride for macro scheduler on boot
Moderators: JRL, Dorian (MJT support)
Hi,
I don't think you can do 1, but 2 is easy by logging the last run date to a file. Use an INI file and then on startup compare the value with today's date and only run if it is different:
Make your INI file look like this:
[Settings]
LastRun=
//At start of script
ReadIniFile>inifile.ini,Settings,LastRun,lrDate
GetDate>today
If>lrDate=today,end
..
..
.. rest of script here
..
..
//Write date to ini file
EditIniFile>inifile.ini,Settings,LastRun,today
Label>end
Now the script can only do it's business once a day (if the date is different to the last date it ran).
Hope this helps ...
I don't think you can do 1, but 2 is easy by logging the last run date to a file. Use an INI file and then on startup compare the value with today's date and only run if it is different:
Make your INI file look like this:
[Settings]
LastRun=
//At start of script
ReadIniFile>inifile.ini,Settings,LastRun,lrDate
GetDate>today
If>lrDate=today,end
..
..
.. rest of script here
..
..
//Write date to ini file
EditIniFile>inifile.ini,Settings,LastRun,today
Label>end
Now the script can only do it's business once a day (if the date is different to the last date it ran).
Hope this helps ...
MJT Net Support
[email protected]
[email protected]