Store user name in a file (Prevent Duplication)

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
mokshal1663
Junior Coder
Posts: 33
Joined: Sat Feb 27, 2010 8:11 pm

Store user name in a file (Prevent Duplication)

Post by mokshal1663 » Tue Mar 16, 2010 11:20 pm

Hello. What i'm doing is selling this macro. Now, I need to make sure it isn't given free all over the internet. So, is there a way for the macro to start up on the first use and first use ONLY and make a text file with the user name of that the user is using. Then, all the other times when it runs, it should check for the file and see if the user name is the same.

I need it to do something like that. OR maybe get it to check for a file on the internet and if that file is there, then continue. My code so far (It doesn't do anything yet, just shows a dialog):

Dialog>AutoEP
Caption=AutoEP - http://www.autobot.tk
Width=407
Height=238
Top=295
Left=738
Image=C:\Documents and Settings\mokshal\My Documents\epbg.jpg,0,0,401,201,msImage1,0
Edit=user,16,104,137,User Name
Edit=pass,248,104,137,Password
Button=Start,104,144,97,41,1
Button=End,200,144,97,41,2
EndDialog>AutoEP

show>AutoEP,result

if>result=2
goto>end
endif

if>result=1
goto>start
endif

label>start

label>end

THANKS! Bye!

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Mar 17, 2010 10:00 am

Using a local file is too easy to defeat - the user can just delete the file, or write his username into it. However if you wanted to do this, you could make the script check for a value hidden somewhere in the registry. First time it won't exist, so you assume this is the first run, write your file, then write that value to the registry. Next time it will see the value and check the username in the file. All easily defeated.

But ANY license protection system can be defeated one way or another (when it gets too hard to crack they just buy your software with a stolen credit card and then put it on rapidshare, you then get a chargeback from the legitimate owner, risk the loss of your ecommerce services and suffer a loss in profits and worry that you can't pay your next mortgage payment. Welcome to the joys of running a small software business where the vast majority assume you are a billionaire and thinks it's ok to steel from you).

[/rant over]

Anyway to make the script execute say a PHP script on your web server, or just access a file on the internet, use the HTTPRequest function.

License copy protection is a science to itself and way beyond the scope of our support here. If you google license protection or similar you will find hundreds of products available which can be used to protect your software.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mokshal1663
Junior Coder
Posts: 33
Joined: Sat Feb 27, 2010 8:11 pm

Post by mokshal1663 » Wed Mar 17, 2010 1:08 pm

Could I get the macro to check online if a file exists (a link) and if it doesn't shut down?

Or is it possible for the macro to check for a certain text in a .txt which is hosted online?

Thanks,

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Mar 17, 2010 2:12 pm

Yes. Use the HTTPRequest command.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mokshal1663
Junior Coder
Posts: 33
Joined: Sat Feb 27, 2010 8:11 pm

Example plz?

Post by mokshal1663 » Wed Mar 17, 2010 3:41 pm

Could you please show an example?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Mar 17, 2010 3:46 pm

Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mokshal1663
Junior Coder
Posts: 33
Joined: Sat Feb 27, 2010 8:11 pm

If

Post by mokshal1663 » Wed Mar 17, 2010 3:47 pm

If the file is not found, I need it to do something. And if it is found, i need it to do something. Could you please show me how this will work?

Thanks!

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Mar 17, 2010 6:43 pm

Marcus is more than generous in helping people to solve problems. But it looks to me like you are asking to have him write your scripts for you. I can sense from his brief answers that he probably feels abused right now.

There is plenty of Help available in the Macro Scheduler program. The Help file also includes examples for each of the commands. And there are plenty of examples here on the forum.

May I suggest that YOU write your scripts, and then if they do not work, try to debug them, and then if needed, submit YOUR code to the forum explaining the section that does not work, and the results you are seeing, and the steps to duplicate it. There are many here on the forum who are willing help you to troubleshoot and repair your scripts. But they generally prefer that you do most of the work, not use them as unpaid developers.

Your first example shows the basic structure for the IF commands, fill it in with real code to get your results. What is the current code that does not work?

Sorry if this sounds abrupt, no insults are intended. I want to see you have success, but I don't want to see abuse of a great resource. Thanks for listening.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

mokshal1663
Junior Coder
Posts: 33
Joined: Sat Feb 27, 2010 8:11 pm

Sorry

Post by mokshal1663 » Wed Mar 17, 2010 6:54 pm

Sorry that you feel that way but I didn't intent to abuse. I've been trying to code it for days and have reached to the conclusion where I can't seem to get it. I've looked in the help on macro scheduler, but nothing so far is working.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: If

Post by Marcus Tettmar » Wed Mar 17, 2010 8:37 pm

mokshal1663 wrote:If the file is not found, I need it to do something. And if it is found, i need it to do something. Could you please show me how this will work?

Thanks!
If it is not found then it will return a 401 error. So just check the content of the result variable to see if it contains an error code or the expected data.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mokshal1663
Junior Coder
Posts: 33
Joined: Sat Feb 27, 2010 8:11 pm

Thanks!

Post by mokshal1663 » Wed Mar 17, 2010 9:00 pm

Thanks! I managed to get it working :)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts