Sign in to follow this  
Followers 0
jslegers

A time calculation question

3 posts in this topic

#1 ·  Posted (edited)

Hi,

I have the folowing script :

#include <Date.au3>

$Time = _NowTime(4)

TraySetState ()
TraySetToolTip ("Starting defragmentation on " & ($Time))
Sleep ( 300000 )
TraySetToolTip ("Defragmenting C: drive...")
ShellExecuteWait ( "C:\Windows\JkDefragCmd.exe", "C: -l C:\Defrag_C.log -a 3 -d 1 -s 100 -u ""DisableDefaults""  -f 1", "", "",  @SW_HIDE )
TraySetToolTip ("Defragmenting D: drive...")
ShellExecuteWait ( "C:\Windows\JkDefragCmd.exe", "D: -l C:\Defrag_D.log -a 3 -d 1 -s 100 -u ""DisableDefaults""  -f 1", "", "",  @SW_HIDE )

What I want is that the $Time variable is the current time plus 5 minutes. This so that users can see when the defragmentation is starting. How can I make a calculation with time ?

John

Edited by jslegers

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

What I want is that the $Time variable is the current time plus 5 minutes.

$sNewDate = _DateAdd( 'n',5, _NowCalcDate())
Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

$sNewDate = _DateAdd( 'n',5, _NowCalcDate())
Thanks for the info.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0