;SteelKix Macro: @TIME
;
;Author: Boforce
;
;Contributors: Richard von Mallesch (It took my meds)
;
;Action: Retrieve current Time
;
;Syntax: @TIME
;
;Version: 1.0
;
;Date: 2009-09-28
;
;Date Revised: 2009-09-28
;
;Parameters None
;
;Remarks: None
;
;Returns: Time (in the format HH:MM:SS)
;
;Dependencies:
; SteelKix version: 0.2
; Tested with Dot Net 3.5.30729.01
;
;Example(s): Get Current Time:
; ? @TIME
; Result > 10:23:15
;
;Comments : This has been successfully tested on Windows XP SP3 with DOT NET 3.5.30729.01.
;
;Source:
Macro TIME
Dim $dtn,$rc
Imports $dtn = System.DateTime.Now
Try
$rc = $dtn.ToString("HH:mm:ss")
EndTry
Catch
$e
EndCatch
If $e
$TIME = $e.Message
Else
$TIME = $rc
EndIf
EndMacro
;SteelKix Macro: @DAY
;
;Author: Boforce
;
;Contributors: Richard von Mallesch (It took my meds)
;
;Action: Retrieve day of the week
;
;Syntax: @DAY
;
;Version: 1.0
;
;Date: 2009-09-28
;
;Date Revised: 2009-09-28
;
;Parameters None
;
;Remarks: None
;
;Returns: Day (Monday, Tuesday, etc.)
;
;Dependencies:
; SteelKix version: 0.2
; Tested with Dot Net 3.5.30729.01
;
;Example(s): Get day of the week:
; ? @DAY
; Result > Monday
;
;Comments : This has been successfully tested on Windows XP SP3 with DOT NET 3.5.30729.01.
;
;Source:
Macro DAY
Dim $dtn,$rc
Imports $dtn = System.DateTime.Now
Try
$rc = $dtn.DayOfWeek
EndTry
Catch
$e
EndCatch
If $e
$DAY = $e.Message
Else
$DAY = $rc
EndIf
EndMacro
;SteelKix Macro: @MONTHNO
;
;Author: Boforce
;
;Contributors: Richard von Mallesch (It took my meds)
;
;Action: Retrieve the number of the current month of the year
;
;Syntax: @MONTHNO
;
;Version: 1.0
;
;Date: 2009-09-28
;
;Date Revised: 2009-09-28
;
;Parameters None
;
;Remarks: None
;
;Returns: Month number, beginning with January (1-12)
;
;Dependencies:
; SteelKix version: 0.2
; Tested with Dot Net 3.5.30729.01
;
;Example(s): Get month number of the year:
; ? @MONTHNO
; Result > 10 (if month is October)
;
;Comments : This has been successfully tested on Windows XP SP3 with DOT NET 3.5.30729.01.
;
;Source:
Macro MONTHNO
Dim $dtn,$rc
Imports $dtn = System.DateTime.Now
Try
$rc = $dtn.Month
EndTry
Catch
$e
EndCatch
If $e
$MONTHNO = $e.Message
Else
$MONTHNO = $rc
EndIf
EndMacro
;SteelKix Macro: @MONTH
;
;Author: Boforce
;
;Contributors: Richard von Mallesch (It took my meds)
;
;Action: Retrieve the name of the current month of the year
;
;Syntax: @MONTH
;
;Version: 1.0
;
;Date: 2009-09-28
;
;Date Revised: 2009-09-28
;
;Parameters None
;
;Remarks: None
;
;Returns: Name of the Month
;
;Dependencies:
; SteelKix version: 0.2
; Tested with Dot Net 3.5.30729.01
;
;Example(s): Get month of the year:
; ? @MONTH
; Result > OCTOBER (if month is October)
;
;Comments : This has been successfully tested on Windows XP SP3 with DOT NET 3.5.30729.01.
;
;Source:
Macro MONTH
Dim $dtn,$glob,$rc
Imports $dtn = System.DateTime.Now
Imports $glob = System.Globalization
Try
$rc = $dtn.Month
EndTry
Catch
$e
EndCatch
If $e
$MONTH = $e.Message
Else
$MONTH = $glob.DateTimeFormatInfo.CurrentInfo.GetMonthName($rc).ToUpper()
EndIf
EndMacro