|
|
|
| 18 September 2003 | GetGUID() |
| Author | Jens Meyer (sealeopard@usa.net) |
| Action | Creates a GUID (globally unique identifier). |
| Syntax | GetGUID ([format]) |
| Parameters | |
| Remarks | none |
| Returns | GUID |
| Dependencies | requires IE4.0+ |
| Examples | $guid=GetGUID() |
| Source |
FUNCTION GetGUID (OPTIONAL $format)
$getguid = CreateObject("Scriptlet.TypeLib").guid
IF @error
EXIT @error
ENDIF
SELECT
CASE $format=1
$getguid=Right(Left($getguid,-1),-1)
CASE $format=2
$getguid=Join(Split(Right(Left($getguid,-1),-1),'-'),'')
ENDSELECT
EXIT @error
ENDFUNCTION ; - GetGUID -
|
|
|
|