UUID

Klaus on-rev klaus at major.on-rev.com
Tue Aug 17 07:24:24 CDT 2010


Hi all,

Am 17.08.2010 um 14:18 schrieb Malte Pfaff-Brill:

> Hey Monte,
> 
> http://marksmith.on-rev.com/revstuff/
> He has got a very nice lib for UUIDs
> 
> Cheers,
> 
> Malte

Yep, or just use shell on Mac and Win (no idea about Linux, but might be similar to MacOS)!

Put these two lines into a custom property of your stack or wherever

Set TypeLib = CreateObject("Scriptlet.TypeLib")
result = TypeLib.Guid

And then use this function to get a UUID:

function get_uuid
    if the platform = "MacOS" then
    put shell("uuidgen") into tUUID
  else
    do (the YOUR_CP_NAME_HERE of stack "your stack with the CP") as VBScript
    put the result into tUUID

  ## Comes in {} on Windows!
    delete char -1 of tUUID
    delete char 1 of  tUUID
  end if
  return tUUID
end get_uuid


Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major.on-rev.com




More information about the use-livecode mailing list