Lasso Soft Inc. > Home


AuthorJason Huck
Posted16 Jan 2006
Updated16 Jan 2006
More by this author...


Generates a 14-character string based on the current datetime that should be unique in all but the most extreme cases. Useful in cases where you need to, for instance, create a unique, non-linear filename and [lasso_uniqueid] is just a few characters too long (with a dot-three extension) to guarantee safe file transfer via FTP.

Sample Usage


Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

define_tag: 'c5_shortunique';
	local: 'chars' = (map:
		0 = 'AaZz',
		1 = 'BbYy',
		2 = 'CcXx',
		3 = 'DdWw',
		4 = 'EeVv',
		5 = 'FfUu',
		6 = 'GgTt',
		7 = 'HhSs',
		8 = 'IiRr',
		9 = 'JjQq'
	local: 'time' = (string: date->(format: '%Y%m%d%H%M%S'));
	local: 'out' = string;
	iterate: #time, local: 'thisDigit';
		local: 'rnd' = (math_random: -min=1, -max=5);
		#out = #chars->(find: (integer: #thisDigit))->(get: #rnd) + #out;
	return: #out;

Related Tags


No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft