Over-ride for macro scheduler on boot

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
gary

Over-ride for macro scheduler on boot

Post by gary » Wed May 21, 2003 12:06 am

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

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Wed May 21, 2003 9:42 am

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 ...
MJT Net Support
[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts