Shareware protection system for macros

Functions, classes, components, etc. Only high quality content.

Shareware protection system for macros

Postby Gintaras on Wed Sep 28, 2005 11:57 am

Using these functions, you can easily protect your commercial macros from using beyond the evaluation period.

You and your cutomers must have QM 2.1.5 or later.
_________________

Version 1.0.1.
Fixed bug causing the dialog to stop working when encrypted.

Version 1.0.2.
Computer-specific registration codes.
More clear and secure.

Version 1.0.3.
Can be used in exe too.
Uses registry hive HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE. Using local machine would fail on Vista or when running as a limited (non admin) user. Please review registry variables in your SM_About and SM_CanRun. You probably have to change the value assigned to sm_registry_key_first_run.
Attachments
Shareware macros.qml
Import it.
(18.48 KiB) Downloaded 2125 times
Last edited by Gintaras on Tue Jan 16, 2007 4:15 pm, edited 5 times in total.
Gintaras
Site Admin
 
Posts: 10232
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Postby TriMoon on Thu Dec 01, 2005 3:11 am

I had a fast look through this and looks nice 8)

Now we need a way to retrive and test codes from a webpage and this system will be dynamic :wink:
Im looking forward to your solution to this approach :lol:
Well thats all for now, 3M
User avatar
TriMoon
 
Posts: 69
Joined: Thu Dec 01, 2005 2:51 am
Location: Amsterdam

Postby Gintaras on Thu Dec 01, 2005 12:34 pm

How exactly it should work?
Gintaras
Site Admin
 
Posts: 10232
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Postby TriMoon on Sat Dec 03, 2005 5:04 am

Well uhmmm...
How about it accesses a URL with parameters, then captures some portion from the output?

That way it can send the used code to a preconfigured web address and let the website provide feedback about the validity of the code.

If that works the maintainer of the macro can have a script, javascript/CGI/whatever on a website with active codes he gave out.
And also have a posibility to revoke codes that way easyly and on the fly...

You know what i mean?
Well thats all for now, 3M
User avatar
TriMoon
 
Posts: 69
Joined: Thu Dec 01, 2005 2:51 am
Location: Amsterdam

Postby Gintaras on Sat Dec 03, 2005 9:39 am

What if the user is disconnected from the Internet, or the url is temporarily unavailable? Other problem - delay, especially if the url is unavailable. In some cases, there may be delay of 10 - 30 seconds.

Maybe at first validate the regcode locally, then asynchronously access the url, and, if the regcode is invalid, lock later?
Gintaras
Site Admin
 
Posts: 10232
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Postby TriMoon on Tue Dec 06, 2005 6:10 am

Well thats ofcourse up to the shareware writer....
He could also maybe set it to check once a week...
Besides its only checked at startup of the macro, so a small delay wont be a problem i think...

But incase of time-outs there should be a way to notice the user and let it retry...
Well thats all for now, 3M
User avatar
TriMoon
 
Posts: 69
Joined: Thu Dec 01, 2005 2:51 am
Location: Amsterdam

Postby Gintaras on Fri Jun 02, 2006 5:05 pm

Version 1.0.2.
Computer-specific registration codes.
More clear and secure.
Gintaras
Site Admin
 
Posts: 10232
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Postby Gintaras on Tue Jan 16, 2007 4:17 pm

Version 1.0.3.
Can be used in exe too.
Compatible with Vista.
Gintaras
Site Admin
 
Posts: 10232
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Re: Shareware protection system for macros

Postby Ghost on Sat Aug 09, 2008 9:31 pm

How do u find the reg code in the clipboard?
thanks this looks like a great file
Ghost
 
Posts: 56
Joined: Sat Jul 19, 2008 4:29 pm

Re: Shareware protection system for macros

Postby crip on Wed Oct 15, 2008 4:08 am

Can I change this to hours with 0.1 or whatever or do i need to make a new code for mins
crip
 
Posts: 41
Joined: Mon Jun 30, 2008 8:28 am

Re: Shareware protection system for macros

Postby crip on Wed Oct 15, 2008 8:55 pm

never mind I know you cant use 0.1 I have looked through it and I was wondering if i may get a bit of help making it go by hours instead of days or mins instead of day.
Last edited by crip on Sat Oct 18, 2008 9:19 am, edited 1 time in total.
crip
 
Posts: 41
Joined: Mon Jun 30, 2008 8:28 am

Re: Shareware protection system for macros

Postby crip on Wed Oct 15, 2008 11:08 pm

never mind i figured it all out thanks for sharing this code it really is what i needed
crip
 
Posts: 41
Joined: Mon Jun 30, 2008 8:28 am

Re: Shareware protection system for macros

Postby conanjou on Mon Sep 30, 2013 8:57 am

How to change the code as below to get the network time not local time?
Function SM_CanRun     ?
DATE date_first date_now.getclock


Because I change the local time tor first day, the protection will fail and it can use again.

BTW, I want to modify the code to time limited macro, for example, one reg code will only use the macro 30 day(for example, 9/1 ~9/30, not real usage time), and the macro will need new reg code from me after 30 day, did you have any ideas or any macros?
conanjou
 
Posts: 33
Joined: Wed Sep 25, 2013 2:28 pm

Re: Shareware protection system for macros

Postby Gintaras on Mon Sep 30, 2013 10:22 am

Get time from internet? You can use function IntGetFile to download time from a time server or your website. But it is slow and unreliable, eg user can edit hosts file to disable connection to the webserver.

Instead you can use a counter and date-last-run. Save them in registry. When date-today is not = date-last-run, set date-last-run = date-today and increment counter. When counter is >30, disable your software.

I don't want to develop the shareware protection functions more.
Gintaras
Site Admin
 
Posts: 10232
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Re: Shareware protection system for macros

Postby conanjou on Tue Oct 01, 2013 10:20 am

Thanks for your advices. It was useful for me.

Other quesions as below,

1. From the same macro:
Function SM_About     ?
if(days_left>0) e11.format("UNREGISTERED. %i days left." days_left-1)

I want to show the time consisted of year, month, day, hour, minute...,how to modify the code?

2. I test code as below
Macro Macro3     ?
DATE DAY1.getclock
wait 5
DATE DAY2.getclock
DATE day_diff=DAY1-DAY2
out day_diff


why the result is
am 12:00:05?

3. from QM help:
Macro Macro3     ?
DATE d="4/1/2003"
;add 2 days
d=d+2
out d
;subtract 1 hour
SYSTEMTIME st
st.wHour=1
out d.sub(st)
;get difference in hours
out d.diff("4.1.2003" st 1)
out "%i/%i/%i %i:%i:%i" st.wMonth st.wDay st.wYear st.wHour st.wMinute st.wSecond



the results:
2003/4/3
2003/4/2 下午 11:00:00
Error (RT) in Macro3: 0x80020005, 類型不相符。. ?

and fail in

Macro Macro3     ?
out d.diff("4.1.2003" st 1)


why?and how to modify?
conanjou
 
Posts: 33
Joined: Wed Sep 25, 2013 2:28 pm

Re: Shareware protection system for macros

Postby Gintaras on Tue Oct 01, 2013 10:46 am

1. str function timeformat. Or floating toolbar -> Text -> Text with date/time.

2, 3. DATE variables should be used to store date, not date difference. Better use DateTime.
DateTime DAY1.FromComputerTime
DateTime DAY2=DAY1; DAY2.AddParts(2) ;;+2 days
long day_diff
DateTime.TimeSpanGetPartsTotal(DAY2-DAY1 day_diff)
out day_diff



3. Probably the time string format is unavailable on your PC.
Gintaras
Site Admin
 
Posts: 10232
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Re: Shareware protection system for macros

Postby conanjou on Thu Oct 03, 2013 12:50 am

Thanks again, it is useful for me.
conanjou
 
Posts: 33
Joined: Wed Sep 25, 2013 2:28 pm


Return to QM Extensions

Who is online

Users browsing this forum: No registered users and 1 guest