mulletmandan Posted July 2, 2005 Posted July 2, 2005 I'm trying to set up a script to change the system date temporarily and then change it back. Here's what I've got: $currentdate=@Mon & "/" & @MDay & "/" & @Year MsgBox(4096,"Notify", $currentdate) Run(@ComSpec & " /c " & 'date 11/11/2003', "", @SW_HIDE) MsgBox(4096,"Notify", "Date Changed") Run(@ComSpec & " /c " & 'date $currentdate', "", @SW_HIDE) MsgBox(4096,"Notify", "Date Changed Back") Exit The date will change, but won't change back. I am guessing this has something to do with my variable in Line 5. Any help would be nice. Thanks!
w0uter Posted July 2, 2005 Posted July 2, 2005 (edited) try: Run(@ComSpec & " /c " & 'date ' & $currentdate, "", @SW_HIDE) also IMO it would be better if you use runwait. Edited July 2, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
mulletmandan Posted July 3, 2005 Author Posted July 3, 2005 try:Run(@ComSpec & " /c " & 'date ' & $currentdate, "", @SW_HIDE)also IMO it would be better if you use runwait.<{POST_SNAPBACK}>Sorry, I'm a bit new at this. Could you rewrite that script for me using runwait so I can see its usage?Thanks!
GaryFrost Posted July 3, 2005 Posted July 3, 2005 RunWait(@ComSpec & " /c " & 'date ' & $currentdate, "", @SW_HIDE) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
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