|
SteelKiX Macros: USERID, WKSTA, TICKS, DOMAIN, CRLF, CURDIR
|
|
Macro CURDIR
;Author Richard von Mallesch (It took my meds)
;Action Returns the current directory
;Version 1.0
;Date 23/09/2009
Dim $Env
Imports $Env = System.Environment
$CURDIR = $Env.CurrentDirectory
EndMacro
Macro CRLF
;Author Richard von Mallesch (It took my meds)
;Action Returns a new line
;Version 1.0
;Date 23/09/2009
Dim $Env
Imports $Env = System.Environment
$CRLF = $Env.NewLine
EndMacro
Macro DOMAIN
;Author Richard von Mallesch (It took my meds)
;Action Returns the domain or workgroup the computer belongs to
;Version 1.0
;Date 23/09/2009
Dim $Env
Imports $Env = System.Environment
$DOMAIN = $Env.UserDomainName
EndMacro
Macro TICKS
;Author Richard von Mallesch (It took my meds)
;Action Returns the number of milliseconds elapsed since computer was last booted
;Version 1.0
;Date 23/09/2009
Dim $Env
Imports $Env = System.Environment
$TICKS = $Env.TickCount
EndMacro
Macro USERID
;Author Richard von Mallesch (It took my meds)
;Action Returns the current user's Windows NT user ID
;Version 1.0
;Date 23/09/2009
Dim $Env
Imports $Env = System.Environment
$USERID = $Env.UserName
EndMacro
Macro WKSTA
;Author Richard von Mallesch (It took my meds)
;Action Returns the computer name
;Version 1.0
;Date 23/09/2009
Dim $Env
Imports $Env = System.Environment
$WKSTA = $Env.MachineName
EndMacro
|
|
Re: SteelKiX Macros: USERID, WKSTA, TICKS, DOMAIN, CRLF, CURDIR
|
|
Please update the macro with a header as described in the forum Guidelines post.
|
|
Re: SteelKiX Macros: USERID, WKSTA, TICKS, DOMAIN, CRLF, CURDIR
|
|
OK, done.
|
BoForce
|
(Fresh Scripter)
|
2009-09-23 03:52 PM
|
|
|
|
|
Re: SteelKiX Macros: USERID, WKSTA, TICKS, DOMAIN, CRLF, CURDIR
|
|
Very nice.
|
Lonkero
|
(KiX Master Guru)
|
2009-09-26 01:33 PM
|
|
|
|
|
Re: SteelKiX Macros: USERID, WKSTA, TICKS, DOMAIN, CRLF, CURDIR
|
|
crlf is not the same as new line.
it's a hard coded CRLF. for new line standard kix has the ? command.
also, this listing is missing it's requirements header section. and as they are tested on development version, also summary/notes/comments section should provide with which version it was tested and proven working with.
The header parts that are common, can (and imo should) be combined right at the top.
|
Lonkero
|
(KiX Master Guru)
|
2009-09-26 02:19 PM
|
|
|
|
|
Re: SteelKiX Macros: USERID, WKSTA, TICKS, DOMAIN, CRLF, CURDIR
|
|
also, missing example.
|
WvS
|
(Fresh Scripter)
|
2009-09-26 02:45 PM
|
|
|
|
|
Re: SteelKiX Macros: USERID, WKSTA, TICKS, DOMAIN, CRLF, CURDIR
|
|
The description of @CRLF might be incorrect, but it's implementation is correct. System.Environment.NewLine is equivalent to CRLF on the Windows platform (http://msdn.microsoft.com/en-us/library/system.environment.newline.aspx).
|
Lonkero
|
(KiX Master Guru)
|
2009-09-26 08:50 PM
|
|
|
|
|
Re: SteelKiX Macros: USERID, WKSTA, TICKS, DOMAIN, CRLF, CURDIR
|
|
sure, so the author is the also missing the comment that this .net macro list is only for windows machines.
|
WvS
|
(Fresh Scripter)
|
2009-09-26 09:46 PM
|
|
|
|
|
Re: SteelKiX Macros: USERID, WKSTA, TICKS, DOMAIN, CRLF, CURDIR
|
|
For the sake of completeness, I would also suggest adding comments about the supported .net frameworks, whether silverlight is supported, the computational complexity of the function and the current position of the earth relative to the moon.
|
Lonkero
|
(KiX Master Guru)
|
2009-09-26 11:36 PM
|
|
|
|
|
Re: SteelKiX Macros: USERID, WKSTA, TICKS, DOMAIN, CRLF, CURDIR
|
|
I don't see those as required.
but if one wants to really make his header shine, then maybe those optional parts could be left non-omitted.
|