Adding shareware to an exe

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
DILLIGAF
Newbie
Posts: 4
Joined: Tue Mar 09, 2004 4:36 pm

Adding shareware to an exe

Post by DILLIGAF » Wed May 26, 2004 12:03 am

I'm planning selling some of my programs... I was wondering if there is any way to add shareware to an exe for a customer to try it for lets say 1 week. After one week the exe shuts down giving the cutomer a registration number every time they start it. The customer will then have to sent me the registration code with the payment of $10, then I sent a different code back to ctivate the exe.
I know this is possible with VB6 so I'm hoping I can do the same with the Macro Scheduler 7.2.
Thanks for any help.
Image

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 May 26, 2004 4:29 am

Basic and crude, but some variation may work:

Make an INI file/registry setting when first run to capture Date/Time

After one week (check against INI/Reg).
Rename and/or move and/or split the exe, making it Hidden.

Valid registration code will undo this process and modify/delete INI/Reg settings?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

DILLIGAF
Newbie
Posts: 4
Joined: Tue Mar 09, 2004 4:36 pm

Post by DILLIGAF » Sun Jun 06, 2004 8:53 pm

Thanks Bob got it figured out and it's working great.

I have another question about the dialog window, is there a way to keep it open after an option gets selected?

What I want to is have a Stop button for the use to click when they are done using the program.
The shift+esc seem to confuse some people and a stop button would be more user friendly.
Here is a dialog that I have, maybe you could give me some pointers.
Thanks for all your help you're truly a master when it comes to this program.

Dialog>Dialog
Caption=My Program
Top=187
Width=230
Left=295
Height=75
Button=Start,5,5,100,30,100
Button=Stop,115,5,100,30,200
EndDialog>Dialog
Show>Dialog,Result
If>result=50,50
IF>result=2,2
IF>result=100,StartMain
IF>result=200,Stop
Label>StartMain
Label>Stop
Label>50
Label>2
Image

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 » Sun Jun 06, 2004 9:33 pm

The easiest way to stop the macro is just go to the end......no more commands to execute:
Label>StartMain

Label>Stop
Goto>End

Label>50
Label>2

Label>End
But you asked:
I have another question about the dialog window, is there a way to keep it open after an option gets selected?
Do you want this Dialog to stay open after they press the Stop Button?

All I can think of, is to have the Dialog be its own complete Script, like a Menu Dialog. You can set the Script to run automatically when a particular window opens, so, be sure that your last instruction when Stopping is to open a window that triggers that Dialog script. One of the first lines of the Dialog script could close that window. The window that is called at the end, could also be Hidden so it would not be confusing to the user......

Hope this makes sense, sounds OK to me.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

DILLIGAF
Newbie
Posts: 4
Joined: Tue Mar 09, 2004 4:36 pm

Post by DILLIGAF » Sun Jun 06, 2004 10:18 pm

After the user clicks Start I would like for the dialog window to stay open but the program to continue what it's supose to. When the user is done all he/she has to do is click Stop and the macro stops completely without the user having to press shift+esc.
Hope this makes sence.
Image

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 » Sun Jun 06, 2004 10:59 pm

Can't keep the Dialog window open. Can only suggest a variation to my earlier suggestion.
When click on Start, Do what you want in Start section, when done, open a window that will trigger another copy of the macro calling the same Dialog, and go to the end of the existing macro.
=================================
Macro for Dialog - Set to run when Window ABC opens. Let this Dialog function like a Main Menu
CloseWindow>ABC

Dialog>Dialog
Caption=My Program
Top=187
Width=230
Left=295
Height=75
Button=Start,5,5,100,30,100
Button=Stop,115,5,100,30,200
EndDialog>Dialog
Show>Dialog,Result
If>result=50,call Pgm macro. Pass parameter to run 50
IF>result=2,End
IF>result=100,call Pgm macro. Pass parameter to run StartMain
IF>result=200,call Pgm macro. Pass parameter to run 200
Label>End
======================
Pgm Macro for StartMain and other routines:
//Goto>Parameter passed from Dialog

Label>StartMain
Do some stuff
Let>RP_WINDOWMODE=0
Execute a call that will open window ABC
Goto>End

Label>50
Do some stuff
Let>RP_WINDOWMODE=0
Execute a call that will open window ABC
Goto>End

Label>200
Let>RP_WINDOWMODE=0
Execute a call that will open window ABC
Goto>End

Label>End
==============================
Actions resulting from Dialog buttons:
2 = Cancelled, closes Dialog completely
50 = Another button not listed? Runs 50 and reshows Dialog
100 = Runs routine StartMain and reshows Dialog
200 = Stop Button. Does nothing, but restarts Dialog
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

andyw
Newbie
Posts: 6
Joined: Tue Jul 01, 2003 6:08 pm

Adding a registration code to a script

Post by andyw » Sat Aug 21, 2004 6:53 pm

>>Basic and crude, but some variation may work:

1>>Make an INI file/registry setting when first run to capture Date/Time

2>>After one week (check against INI/Reg).
3>>Rename and/or move and/or split the exe, making it Hidden.

4>>Valid registration code will undo this process and modify/delete >>INI/Reg settings?

Please could someome help me to achieve this. I understand steps 1 and 2 but am unsure as to step 3.

Also, how would you go about generating a unique registration code on each PC.

Thanks in advance for any help.

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 » Sat Aug 21, 2004 9:40 pm

Rather than make file hidden, put code in script to jump to end with message if time has expired. If this is a compiled exe then no worry about someone commenting out the JUMP section

Flow (not good script) to look something like this:
Label>Begin
check data in INI file
if no INI, Dialog to select Register or Trial, make readonly-hidden INI Goto>End
if INI with REG code, Goto>StartNormal
if INI date expired, Goto>Expired

Label>StartNormal
...
...
...

Goto>End

Label>Expired
Message>Expired, need to register

Label>End
Could use Registry setting vs. INI file
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User316
Newbie
Posts: 1
Joined: Sun Aug 22, 2004 4:48 am

Help on clicking a any button when moving window around

Post by User316 » Sun Aug 22, 2004 4:52 am

Help on clicking any button when moving window around. I want to be able to move the window around and still have it click certion buttons that come up. I know it can be done, but don't know haow to do ti.

Lumumba

Post by Lumumba » Sun Aug 22, 2004 7:10 am

PushButton> should do it.

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