by Jake Vuckovic
| Jake writes: | Jake Vuckovic is an Alpha Five developer in Mississauga, Ontario. Jake presents this addendum to his earlier article on application registration. You can reach Jake at teslaac@netscape.net. |
| I'd like to present another method of licensing an
application. No external file is needed for this scheme. Just like my other scheme, this one uses the autoexec script to check for the existence of an index in a table. If the index is found, the global variable "registered" is set to "", and my application loads normally. If the index is not found, the user is prompted to register. If the user enters a correct registration code, the missing index tag is added to the table and "registered" is set to "", otherwise it remains "UNREGISTED DEMO SOFTWARE. PLEASE REGISTER". For this scheme I would choose a table with few records. For example, I have a table that will always have one record. Users are not allowed to add records to it. Jake Vuckovic |
|
Here is Jake's autoexec script: ''XBasic
dim global registered as C
dim global reg_no as C
dim global reg_yes as C
reg_no = "123456789"
registered = "***UNREGISTERED DEMO SOFTWARE. PLEASE REGISTER.***"
'controlpanel.hide()
ON ERROR GOTO register
tbl = table.open("customer.dbf")
indx = tbl.index_get("bycity")
tbl.close()
registered = ""
:Form.view("Your startup form")
cancel()
end
register:
tbl.close()
form.load("Register","dialog")
:Register.activate()
:Register.show()
:Register.close()
ON ERROR GOTO reg_error
if reg_yes = reg_no then
tbl = table.open("customer.dbf")
tbl.index_tag_add("bycity", "city")
tbl.close()
registered = ""
else
registered = "***UNREGISTERED DEMO SOFTWARE. PLEASE REGISTER.***"
end if
:Form.view("Your startup form")
cancel()
end
reg_error:
ui_msg_box("Error",\
"Unable to register. Please read online help for more information.",\
ui_attention_symbol)
registered = "***UNREGISTERED DEMO SOFTWARE. PLEASE REGISTER.***"
:Form.view("Your startup form")
END
1/31/00 Don't forget, we need your feedback to make this site better! |
|