Iwant to make trial version of CD then Make menu to enter reg key to be full version and if done menu came disable with MSG reg is wrong or success.
this code from help
-- Specify the length of the trial period, in days
time_limit = 30;
-- Initialize days_left
days_left = 0;
-- Retrieve previous value stored
date_installed = Application.LoadValue("My Application", "Date Installed");-- Convert loaded value into a number
date_installed = String.ToNumber(date_installed);
-- If there is no previous value (date_installed == 0), create a value
if date_installed == 0 then
Application.SaveValue("My Application", "Date Installed", System.GetDate(DATE_FMT_JULIAN));
days_left = time_limit;
else
days_left = (date_installed + time_limit) - System.GetDate(DATE_FMT_JULIAN);
end
-- Check if there is time left
if String.ToNumber(days_left) < 1 then
Dialog.Message("Trial Period Over", "This software has expired");
Application.Exit();
else
Dialog.Message("Trial Period", "You have "..days_left.." days left in your trial period.");
end
This code make trial but i want to add reg key then menu to add reg key.
this code from help
-- Specify the length of the trial period, in days
time_limit = 30;
-- Initialize days_left
days_left = 0;
-- Retrieve previous value stored
date_installed = Application.LoadValue("My Application", "Date Installed");-- Convert loaded value into a number
date_installed = String.ToNumber(date_installed);
-- If there is no previous value (date_installed == 0), create a value
if date_installed == 0 then
Application.SaveValue("My Application", "Date Installed", System.GetDate(DATE_FMT_JULIAN));
days_left = time_limit;
else
days_left = (date_installed + time_limit) - System.GetDate(DATE_FMT_JULIAN);
end
-- Check if there is time left
if String.ToNumber(days_left) < 1 then
Dialog.Message("Trial Period Over", "This software has expired");
Application.Exit();
else
Dialog.Message("Trial Period", "You have "..days_left.." days left in your trial period.");
end
This code make trial but i want to add reg key then menu to add reg key.
Comment