Random Serial Code Generator

Example scripts and tips (replaces Old Scripts & Tips archive)

Moderators: Dorian (MJT support), JRL, Phil Pendlebury

Post Reply
MadQuestion
Pro Scripter
Posts: 70
Joined: Wed Nov 08, 2017 6:54 pm

Random Serial Code Generator

Post by MadQuestion » Sat Nov 11, 2017 1:19 am

I have been looking for a way to write thousands of randomly generated serial codes into windows notepad. I wanted the codes to look something like this:
538CQ-7W0W6-63022-476BW-24VS1

They had to be completely random and still be totally unique, I have the random part nailed down but having trouble making them totally unique. If only used for a few codes it works fine but with millions of codes being generated there could be a few that turn up to be identical. If anyone knows a better way to do this script please post your suggestions. I would also like to randomize the generation of lowercase and higher case letters if possible.

Code: Select all

Let>INPUT_PASSWORD=0
Let>INPUT_BROWSE=0
Input>NUMBERINSET,How Many Characters Per Set Need To Be Generated?,
Input>NUMBEROFNUMBERSETS,How Many Characters Sets Need To Be Generated?,
Input>NUMBEROFCODES,How Many Codes Need To Be Generated?,
RunProgram>C:\Windows\System32\notepad.exe
WaitWindowOpen>Untitled - Notepad
SetFocus>Untitled - Notepad
Let>NUMBEROFCODESGENERATED=0
Label>RINCEANDREPEATRESET
Let>BLOCK=0
Label>RINCEANDREPEAT
Let>BLOCK=BLOCK+1
Let>KEYCODES=0
Let>CURRENTGEN=0
SetFocus>Untitled - Notepad
Repeat>KEYCODES
  Let>KEYCODES=KEYCODES+1
  Let>SETONELETTER=0
  //Choose Letter Or Number
  Random>2,SKIPONE
  If>SKIPONE=1
    GoTo>NUMBERONE
  Else>SKIPONE<>1
    GoTo>LETTERONE
  Endif
  Label>LETTERONE
  //Chooses Letter
  Repeat>SETONELETTER
    Let>SETONELETTER=SETONELETTER+1
    Random>26,RANDOMGEN
    If>RANDOMGEN=1
      Let>RANDOMGEN=Z
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=2
      Let>RANDOMGEN=A
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=3
      Let>RANDOMGEN=B
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=4
      Let>RANDOMGEN=C
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=5
      Let>RANDOMGEN=D
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=6
      Let>RANDOMGEN=E
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=7
      Let>RANDOMGEN=F
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=8
      Let>RANDOMGEN=G
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=9
      Let>RANDOMGEN=H
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=10
      Let>RANDOMGEN=I
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=11
      Let>RANDOMGEN=J
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=12
      Let>RANDOMGEN=K
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=13
      Let>RANDOMGEN=L
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=14
      Let>RANDOMGEN=M
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=15
      Let>RANDOMGEN=N
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=16
      Let>RANDOMGEN=O
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=17
      Let>RANDOMGEN=P
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=18
      Let>RANDOMGEN=Q
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=19
      Let>RANDOMGEN=R
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=20
      Let>RANDOMGEN=S
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=21
      Let>RANDOMGEN=T
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=22
      Let>RANDOMGEN=U
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=23
      Let>RANDOMGEN=V
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=24
      Let>RANDOMGEN=W
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=25
      Let>RANDOMGEN=X
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=26
      Let>RANDOMGEN=Y
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=0
      Let>RANDOMGEN=Y
      GoTo>SENDTORANDOMGEN001
    Endif
  Label>SENDTORANDOMGEN001
  Send>%RANDOMGEN%
  Until>SETONELETTER>0
  GoTo>SKIPNUMBERONE
  Label>NUMBERONE
  //Chooses Number
  Let>SETONENUMBER=0
  Repeat>SETONENUMBER
    Let>SETONENUMBER=SETONENUMBER+1
    Random>9,RANDOMGEN
    Send>%RANDOMGEN%
  Let>CURRENTGEN=%RANDOMGEN%
  Until>SETONENUMBER>0
  Label>SKIPNUMBERONE
Until>KEYCODES=%NUMBERINSET%
If>BLOCK=%NUMBEROFNUMBERSETS%
  SetFocus>Untitled - Notepad
  Press Enter
  GoTo>ENDSTRING
Endif
If>BLOCK<%NUMBEROFNUMBERSETS%
  SetFocus>Untitled - Notepad
  Send>-
  GoTo>RINCEANDREPEAT
Endif
Label>ENDSTRING
Let>NUMBEROFCODESGENERATED=NUMBEROFCODESGENERATED+1
If>NUMBEROFCODESGENERATED=%NUMBEROFCODES%
  GoTo>ENDSCRIPT
Endif
GoTo>RINCEANDREPEATRESET
Label>ENDSCRIPT

MadQuestion
Pro Scripter
Posts: 70
Joined: Wed Nov 08, 2017 6:54 pm

Re: Random Serial Code Generator

Post by MadQuestion » Sat Nov 11, 2017 1:29 am

I suppose to get the lowercase and uppercase to be randomly chosen I could put this code in the letter section

Code: Select all

If>RANDOMGEN=1
Let>RANDOMGEN=Z
Random>2,CASECHOICE
If>CASECHOICE=1
LowerCase>%RANDOMGEN%,RANDOMCASE
Let>RANDOMGEN=%RANDOMCASE%
Endif
If>CASECHOICE<>1
UpperCase>%RANDOMGEN%,RANDOMCASE
Let>RANDOMGEN=%RANDOMCASE%
Endif
GoTo>SENDTORANDOMGEN001
Endif

MadQuestion
Pro Scripter
Posts: 70
Joined: Wed Nov 08, 2017 6:54 pm

Re: Random Serial Code Generator

Post by MadQuestion » Sat Nov 11, 2017 1:45 am

The lower and uppercase letters are randomly generated in this script

Code: Select all

Let>INPUT_PASSWORD=0
Let>INPUT_BROWSE=0
Input>NUMBERINSET,How Many Characters Per Set Need To Be Generated?,
Input>NUMBEROFNUMBERSETS,How Many Characters Sets Need To Be Generated?,
Input>NUMBEROFCODES,How Many Codes Need To Be Generated?,
RunProgram>C:\Windows\System32\notepad.exe
WaitWindowOpen>Untitled - Notepad
SetFocus>Untitled - Notepad
Let>NUMBEROFCODESGENERATED=0
Label>RINCEANDREPEATRESET
Let>BLOCK=0
Label>RINCEANDREPEAT
Let>BLOCK=BLOCK+1
Let>KEYCODES=0
Let>CURRENTGEN=0
SetFocus>Untitled - Notepad
Repeat>KEYCODES
  Let>KEYCODES=KEYCODES+1
  Let>SETONELETTER=0
  //Choose Letter Or Number
  Random>2,SKIPONE
  If>SKIPONE=1
    GoTo>NUMBERONE
  Else>SKIPONE<>1
    GoTo>LETTERONE
  Endif
  Label>LETTERONE
  //Chooses Letter
  Repeat>SETONELETTER
    Let>SETONELETTER=SETONELETTER+1
    Random>26,RANDOMGEN
    If>RANDOMGEN=1
      Let>RANDOMGEN=Z
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=2
      Let>RANDOMGEN=A
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=3
      Let>RANDOMGEN=B
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=4
      Let>RANDOMGEN=C
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=5
      Let>RANDOMGEN=D
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=6
      Let>RANDOMGEN=E
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=7
      Let>RANDOMGEN=F
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=8
      Let>RANDOMGEN=G
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=9
      Let>RANDOMGEN=H
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=10
      Let>RANDOMGEN=I
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=11
      Let>RANDOMGEN=J
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=12
      Let>RANDOMGEN=K
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=13
      Let>RANDOMGEN=L
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=14
      Let>RANDOMGEN=M
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=15
      Let>RANDOMGEN=N
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=16
      Let>RANDOMGEN=O
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=17
      Let>RANDOMGEN=P
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=18
      Let>RANDOMGEN=Q
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=19
      Let>RANDOMGEN=R
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=20
      Let>RANDOMGEN=S
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=21
      Let>RANDOMGEN=T
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=22
      Let>RANDOMGEN=U
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=23
      Let>RANDOMGEN=V
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=24
      Let>RANDOMGEN=W
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=25
      Let>RANDOMGEN=X
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=26
      Let>RANDOMGEN=Y
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
    If>RANDOMGEN=0
      Let>RANDOMGEN=Y
      Random>2,CASECHOICE
      If>CASECHOICE=1
        LowerCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      If>CASECHOICE<>1
        UpperCase>%RANDOMGEN%,RANDOMCASE
        Let>RANDOMGEN=%RANDOMCASE%
      Endif
      GoTo>SENDTORANDOMGEN001
    Endif
  Label>SENDTORANDOMGEN001
  Send>%RANDOMGEN%
  Until>SETONELETTER>0
  GoTo>SKIPNUMBERONE
  Label>NUMBERONE
  //Chooses Number
  Let>SETONENUMBER=0
  Repeat>SETONENUMBER
    Let>SETONENUMBER=SETONENUMBER+1
    Random>9,RANDOMGEN
    Send>%RANDOMGEN%
  Let>CURRENTGEN=%RANDOMGEN%
  Until>SETONENUMBER>0
  Label>SKIPNUMBERONE
Until>KEYCODES=%NUMBERINSET%
If>BLOCK=%NUMBEROFNUMBERSETS%
  SetFocus>Untitled - Notepad
  Press Enter
  GoTo>ENDSTRING
Endif
If>BLOCK<%NUMBEROFNUMBERSETS%
  SetFocus>Untitled - Notepad
  Send>-
  GoTo>RINCEANDREPEAT
Endif
Label>ENDSTRING
Let>NUMBEROFCODESGENERATED=NUMBEROFCODESGENERATED+1
If>NUMBEROFCODESGENERATED=%NUMBEROFCODES%
  GoTo>ENDSCRIPT
Endif
GoTo>RINCEANDREPEATRESET
Label>ENDSCRIPT

MadQuestion
Pro Scripter
Posts: 70
Joined: Wed Nov 08, 2017 6:54 pm

Re: Random Serial Code Generator

Post by MadQuestion » Sat Nov 11, 2017 1:47 am

Now how to make sure the script wont accidentally generate two identical codes over millions of cycles...... :| :idea:

ocnuybear
Pro Scripter
Posts: 100
Joined: Sun Jul 15, 2018 5:14 pm

Re: Random Serial Code Generator

Post by ocnuybear » Sun Jul 15, 2018 5:17 pm

You can use this site that gives true random numbers from atmospheric noise - they have an API (not tested):
https://api.random.org/json-rpc/1/

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Random Serial Code Generator

Post by Marcus Tettmar » Tue Jul 17, 2018 7:47 am

Why not use a GUID:

Code: Select all

VBSTART
Function CreateGUID
  Dim TypeLib
  Set TypeLib = CreateObject("Scriptlet.TypeLib")
  CreateGUID = Mid(TypeLib.Guid, 2, 36)
End Function
VBEND

VBEVal>CreateGUID,res
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Grovkillen
Automation Wizard
Posts: 1131
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Random Serial Code Generator

Post by Grovkillen » Wed Jan 10, 2024 6:50 am

Thanks Marcus for this code snippet! Came really handy today.
Let>ME=%Script%

Running: 15.0.27
version history

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts