svenjatzu Posted April 21, 2019 Share Posted April 21, 2019 Hi im looking for a way to change the time from my windows system with scrypt. sometimes the set time is incorrect so that severl programs wont run. The sollution is resync the nettime by klick on sync time from internet. someone knows how to reallise this? Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted April 21, 2019 Share Posted April 21, 2019 @svenjatzu Take a look at _Date_Time_SetSystemTime Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
svenjatzu Posted April 21, 2019 Author Share Posted April 21, 2019 Thanks Francesco but how to place the right time insite? Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted April 21, 2019 Share Posted April 21, 2019 (edited) @svenjatzu If you take a look at the sample about the function mentioned below, it is explained how. Edited April 21, 2019 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Nine Posted April 21, 2019 Share Posted April 21, 2019 There is multiple internet sites that will give the right time (for example : http://worldtimeapi.org). “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
svenjatzu Posted April 21, 2019 Author Share Posted April 21, 2019 well but how to combine both? Link to comment Share on other sites More sharing options...
svenjatzu Posted April 21, 2019 Author Share Posted April 21, 2019 or how can i include the http://worldtimeapi.org/ api inside ; Set new system time $tNew = _Date_Time_EncodeSystemTime(8, 19, @YEAR, 3, 10, 45) If Not _Date_Time_SetSystemTime($tNew) Then MsgBox($MB_SYSTEMMODAL, "Error", "System clock cannot be SET" & @CRLF & @CRLF & _WinAPI_GetLastErrorMessage()) Exit EndIf $tNew = _Date_Time_GetSystemTime() MemoWrite("New system date/time .....: " & _Date_Time_SystemTimeToDateTimeStr($tNew)) Link to comment Share on other sites More sharing options...
Rex Posted April 21, 2019 Share Posted April 21, 2019 I recall that longtime ago a similar question was asked, and several solutions was suggested One of those solutions might work for you Cheers /Rex Link to comment Share on other sites More sharing options...
Nine Posted April 22, 2019 Share Posted April 22, 2019 18 hours ago, svenjatzu said: or how can i include the http://worldtimeapi.org/ api inside Here is how you get the date and time out the web site : #include <Constants.au3> Local $String = BinaryToString(InetRead ("http://worldtimeapi.org/api/timezone/America/Toronto",1)) Local $Time = StringRegExp ($String,'datetime: (.+?)T(\d+:\d+:\d+)', $STR_REGEXPARRAYMATCH) MsgBox ($MB_SYSTEMMODAL,"",$Time[0] & " " & $Time[1]) Now I will let you convert those to the right format. Not a big deal... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
svenjatzu Posted April 23, 2019 Author Share Posted April 23, 2019 Thanks alot Nine : ) grom here i can rock it 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