Guides/GUID Generator

From J Wiki
Jump to navigation Jump to search

J base library has a module for generating GUIDs. For details and different output formats see JSvnBase:packages/misc/guid.ijs

   guidsr , load'guid'
CC2A8425-E972-764B-8E58-F2A5CF6FE528
   guidss
{22EC2F5C-C4AD-C44E-A9C8-BD09361E56A3}

Here we will show how to make stand-alone GUID generators for use directly from the Start menu or command line.

Windows

Guid.png
GUID Generator window

We will add a new icon shortcut for the J Start menu. Then selecting the icon will show the GUID in a small dialog and copy it to the clipboard.

Procedure

  • right-click Start, choose Explore
  • open ... All Users\Start Menu\Programs\J
  • select J 601 and duplicate it: CTRL+C CTRL+V F2, type J GUID, ENTER
  • copy the line below (select it, CTRL+C)

 -jijx -js "exit wdinfo 'J GUID';(([wd)'clipcopy *'&,) guidsr,load'guid'"`

  • open Properties (ALT+ENTER)
  • paste at the end of Target (END SPACE CTRL+V)
  • close Properties (ENTER)

Guid-config.png

Done. Close the Explorer window. To verify select Start > Programs > J > J GUID.

Command Line

Use directly, alias or create a command script.

c:\j601> jconsole -js "exit echo guidsr,load'guid'"

For example,

c:\j601> jconsole -js "exit echo guidsr,load'guid'"
E364D1B3-7927-FA40-97CB-69A65F7A30DB


Contributed by Oleg Kobchenko