this function does some work with the motherboard serial to make it easier to get your own perseat charge or to keep a customer from trying to get the same program on multiple machines. With a couple scripts and autoexec you can build your own registration setup.
It gets the serial, makes it all numbers, cuts it down to size, returns the anser to a global var, returns a var dividing it by 8, so a simple reg would require the user to input a matching code.
I use it with a detached table where the mb, code, anser are kept. on startup the external tbl is read and if all matches, the user never sees anything, but if the mb field does not match this function var, it prompts to register, they have to call me.
modify as you will. It is really a simple function, but could save someone some time.
It gets the serial, makes it all numbers, cuts it down to size, returns the anser to a global var, returns a var dividing it by 8, so a simple reg would require the user to input a matching code.
I use it with a detached table where the mb, code, anser are kept. on startup the external tbl is read and if all matches, the user never sees anything, but if the mb field does not match this function var, it prompts to register, they have to call me.
modify as you will. It is really a simple function, but could save someone some time.
Code:
'Date Created: 04-Apr-2007 02:34:13 PM 'Last Updated: 09-Apr-2008 09:01:56 PM 'Created By : dave 'Updated By : dave1 FUNCTION getmb AS C (valwithdate as c) Dim s as P dim global results1 as c s = win_motherboard() 'dim global valwithdate as c results1 = s.SerialNumber results1 = strtran(results1,"A","1") results1 = strtran(results1,"B","2") results1 = strtran(results1,"C","3") results1 = strtran(results1,"D","4") results1 = strtran(results1,"E","5") results1 = strtran(results1,"F","6") results1 = strtran(results1,"G","7") results1 = strtran(results1,"H","8") results1 = strtran(results1,"I","9") results1 = strtran(results1,"J","10") results1 = strtran(results1,"K","11") results1 = strtran(results1,"L","12") results1 = strtran(results1,"M","13") results1 = strtran(results1,"N","14") results1 = strtran(results1,"O","15") results1 = strtran(results1,"P","16") results1 = strtran(results1,"Q","17") results1 = strtran(results1,"R","18") results1 = strtran(results1,"S","1") results1 = strtran(results1,"T","1") results1 = strtran(results1,"U","1") results1 = strtran(results1,"V","1") results1 = strtran(results1,"W","1") results1 = strtran(results1,"X","1") results1 = strtran(results1,"Y","1") results1 = strtran(results1,"Z","1") 'results1 = val(results1)/10 'results1 = remspecial(results1) results1 = right(remspecial(results1),7) dim global mbans1 as n dim global mbanswer as c mbans1 = int((val(results1)/8)) mbanswer = str(mbans1,7,0) mbanswer = alltrim(mbanswer) END FUNCTION
Comment