Zinthose Posted July 25, 2008 Share Posted July 25, 2008 (edited) Using the "Scriptlet.TypeLib" COM object you can easily generate a GUID for whatever use you can imagine.I went a tad overboard and added the official documentation for the sake of practice. #Include File - GenGUID.au3expandcollapse popup#include-Once ; #INDEX# ======================================================================================================================= ; Title .........: GenGUID ; AutoIt Version : 3.2.10++ ; Language ......: English ; Description ...: This module contains a function to generate a GUID string. ; =============================================================================================================================== ; #NO_DOC_FUNCTION# ============================================================================================================= ; Not documented - function(s) no longer needed, will be worked out of the file at a later date ; =============================================================================================================================== ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ;_GenerateGUID ; =============================================================================================================================== ; #INTERNAL_USE_ONLY#============================================================================================================ ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name...........: _GenerateGUID ; Description ...: Genterates a GUID string. ; Syntax.........: _GenerateGUID() ; Parameters ....: ; Return values .: Success - String ; Failure - -1, sets @error to 1 ; Author ........: Dane Robert Jones <danerjones at gmail dot com> ; Modified.......: ; Remarks .......: Uses the "Scriptlet.TypeLib" COM object. ; Related .......: ; Link ..........; ; Example .......; Yes ; =============================================================================================================================== Func _GenerateGUID() Local $TypeLib = ObjCreate("Scriptlet.TypeLib") If IsObj($TypeLib) Then Return $TypeLib.Guid Else SetError(1) Return -1 EndIf EndFunc ;==>_GenerateGUIDoÝ÷ Úȳz쥩ì·)^ Edited July 25, 2008 by Zinthose --- TTFN Link to comment Share on other sites More sharing options...
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