kuhasu Posted January 13, 2010 Share Posted January 13, 2010 How can I set process time but meanwhile don't change the sys time? e.g. A.exe runs at 2008.01.01 systime is 2006.02.03 TIA Link to comment Share on other sites More sharing options...
anixon Posted January 13, 2010 Share Posted January 13, 2010 How can I set process time but meanwhile don't change the sys time? e.gA.exe runs at 2008.01.01 systime is 2006.02.03 TIA You can create a Loop which contains the a.exe and simply put a call to the loop somewhere in your code and when the dates match then it runs the code. Not Tested #Include <date.au3> Global $DateVariable = yyyy/mm/dd hh:mm:ss ;//Your special time Global $sEpoch = "2010/01/01 00:00:00" While 1 _RunMyCode($DateVariable) Sleep(60000) If ProcessExists(a.exe) Exitloop WEnd Func _RunMyCode($DateVariable) $sNow = _DateDiff('s', $sEpoch, _NowCalc()) $sRun = _DateDiff('s', $sEpoch, $DateVariable If $sNow >= $sRun Then A.exe EndIf EndFunc The above code has not been tested but should give you a starting idea.. Ant.. Link to comment Share on other sites More sharing options...
kuhasu Posted January 13, 2010 Author Share Posted January 13, 2010 I mean to run A.exe at 2008.01.01 where the systime is 2006.02.03 And A.exe calls the value of the systime when it starts..... some kind of system internal value,it seems... Link to comment Share on other sites More sharing options...
anixon Posted January 13, 2010 Share Posted January 13, 2010 I mean to run A.exe at 2008.01.01 where the systime is 2006.02.03And A.exe calls the value of the systime when it starts.....some kind of system internal value,it seems...I am not sure what 2008.01.01 represents yyyy/mm/dd ? or yyyy/dd/mm anyway AutoIT to perform date maths uses the elapsed time value in either days, hours or seconds since a start datewhich can be used to set a trigger based on system, or local time. If you investigate AutoIT 'Help' time zone 'Local' and daylight saving off-sets are fully documented as I am not sure what you understand to be the computers system time. Perhaps if you write the code and post it to this forum you will get more specialised support. Many of the examples of date processing in Helpwill run so it gives you an opportunity to see what it actually does and provides a good starting point for your solution. Good luck and I look forward to your next post. Ant.. Link to comment Share on other sites More sharing options...
kuhasu Posted January 14, 2010 Author Share Posted January 14, 2010 I am not sure what 2008.01.01 represents yyyy/mm/dd ? or yyyy/dd/mm anyway AutoIT to perform date maths uses the elapsed time value in either days, hours or seconds since a start datewhich can be used to set a trigger based on system, or local time. If you investigate AutoIT 'Help' time zone 'Local' and daylight saving off-sets are fully documented as I am not sure what you understand to be the computers system time. Perhaps if you write the code and post it to this forum you will get more specialised support. Many of the examples of date processing in Helpwill run so it gives you an opportunity to see what it actually does and provides a good starting point for your solution. Good luck and I look forward to your next post. Ant..as far as I know,It seems to change the returned value when a process calling clock() this kind of Vars Link to comment Share on other sites More sharing options...
anixon Posted January 14, 2010 Share Posted January 14, 2010 as far as I know,It seems to change the returned value when a process calling clock() this kind of VarsPost the code and you will get support Ant.. Link to comment Share on other sites More sharing options...
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