eBook authors eBook Software - create and publish your own ebooks
Create your own eBooks
Learn How To Create, Publish & Market E-Books
E-Book Creation Software
Add sophisticated multimedia to your E-Books
Create E-Book covers in minutes
E-Book Marketing & Promotion made easy
Search engine for E-Books
Interviews with eBook authors
Tools for building better eBooks
Archived Message:

Nag screen

editor I would like to build a so-called "nag screen" into an e-book that would appear each time a reader exits. It would ask them to consider making a donation in support of the group that freely distributes the e-book.

I'm wondering if anyone knows how I might do this with Activ E-Book Compiler?

Posted on: 7:04 pm on December 5, 2008
rlemire editor;

If you look in the Activ E-Book Help document under the (Variables & Script) tag -- you will see a heading called Add-Ins -- How to use...

There are instruction explaining how to add an "On Exit" command that could be used to pop-up a message box or you could even display an HTML web page.

I hope this helps..


Posted on: 7:27 am on December 8, 2008
editor Thanks, Ron! That was just what I was looking for!

Posted on: 10:14 pm on December 12, 2008
editor Hmmm! I began looking into the documentation for message boxes and have run into a problem. I would like the message box to ask something like, "Would you like to donate?" and have "Yes" and "No" buttons. If someone clicks "Yes," they would be taken to the PayPal Web site. If they click no, the message box would be dismissed. It would appear that I need a MESSAGEBOX2. I've thoroughly searched this board and the Active E-Book Help file and can find almost nothing about how to code a MESSAGEBOX2. I can construct it okay (the "Activ Script Message Box Statements" section of the Help file tells me how), but I can't find anything that tells me how to make the buttons do what I want them to do when they're clicked. Can anyone help?

Posted on: 6:16 am on December 13, 2008
rlemire editor;

You are now entering into the realm of computer programing using Activ Script. Unfortunately there is very little documentation available.

The Activ "help" for MESSAGEBOX2  tells you what values are returned... but what you do with that information is up to you. This requires some detective work and a lot of patience. Everything must be researched and hand coded... there is no "quick" fix. To use Activ Script you will need to figure out how best to do what you want.

For example, you will need to search through the "Activ Script Statements" section of the Activ "help" and see how use the "SET" and "GET" variables, use loops and (if - then - else) statements. You can also search through the "EBookCode.com" web site for examples of Activ Script.

If you are using my HYPrLock security system, there is a HYPrLock add-on product called HYPrScript that allows you to use JavaScript to access and interact with your Activ E-Book code.


Posted on: 7:11 pm on December 13, 2008
editor Ron, I'm likely one of the most patient and tenacious problem solvers you've ever met online. I'm a self-taught coder who has already accomplished what I think are some pretty unique things in my eBook using both Activ Script and JavaScript. I'm not asking to be "spoon fed" or to have someone do my work for me. All I'm asking is to be pointed in the right direction via some concrete examples. Given that the Activ E-Book Help file offers only an elementary description of MESSAGEBOX2, and given that there is only one brief reference to MESSAGEBOX2 on this entire board, I don't think I'm asking too much. Surely someone here has written code which they could share as an example of how to use MESSAGEBOX2.

I am trying a few things in the interim, though, like this code in a script file called nag.as:

MESSAGEBOX2('doWhat','Would you like to donate?',52)
IF({doWhat} = 6)
IF({doWhat} = 7)

I keep getting this error, however:

Activ Script error in line 1 of nag.as
Unable to parse numerical expression

According to the Help file, the numerical expression should work. Quoting...

[T]he type of message box...should be the sum of a value from each of these three series of numbers:

Which buttons are required:
4 Yes and No
Which icon is required:
48 The question-mark icon
Which button is the default:
0 The first button

The total in this case: 4+48+0=52

(Edited by editor at 12:41 am on Dec. 14, 2008)

Posted on: 6:00 am on December 14, 2008
rlemire editor;

I'm glad to hear you have a lot of patience, few people do these days. Most people want instant gratification and do not take the time to learn the basics.

If you go to the Activ "Help" section and click on the "Control Flow" link in the Reference section you will see the syntax standard used for an "IF" statement.

Then you can change your second "IF" statement to an "ELSE" statement and get your code to work.

MESSAGEBOX2('doWhat','Would you like to donate?',52)
IF({doWhat} = 6)

I hope this helps..
BTW: I've tried the code myself and it works...


Posted on: 8:44 pm on December 15, 2008
editor Thanks once again, Ron (the code now works for me, too). I'm so glad that this thread is now here. It adds one more piece to the Activ E-Book Compiler "puzzle" and offers everyone who reads this the ability to add yet another unique feature to their projects!

Posted on: 3:42 am on December 16, 2008
rlemire editor;

Glad I could be of help.

Working with Activ Script can be difficult but I don't complain because Activ E-Book is the only eBook compiler that comes with it's own scripting language. Anyone with tenacity, can use this feature to create amazing eBooks and eBook programs. Thankfully I love solving puzzles.

Most programmers dismiss JavaScript because they don't know how to access the Windows Operating system. In reality, using JavaScript and Activ E-Book, software authors can build almost any "exe" program. Visual Basic, C, C++ or Java are not required -- all you need is Activ E-Book, an HTML editor and some imagination.


Posted on: 5:35 am on December 16, 2008

List All Archived Forums

Copyright © 2000-2018, Answers 2000 Limited.

With any business, it is up to the individual owner of said business to ensure the success of the business. You may make more or less than any sample figures or results that might be quoted on our web sites or other publications. All business involves risk, and many businesses do not succeed. Further, Answers 2000 Limited does NOT represent that any particular individual or business is typical, or that any results or experiences achieved by any particular individual/business is necessarily typical.

Disclosure: Our company's websites' content (including this website's content) includes advertisements for our own company's websites, products, and services, and for other organization's websites, products, and services. In the case of links to other organization's websites, our company may receive a payment, (1) if you purchase products or services, or (2) if you sign-up for third party offers, after following links from this website. Unless specifically otherwise stated, information about other organization's products and services, is based on information provided by that organization, the product/service vendor, and/or publicly available information - and should not be taken to mean that we have used the product/service in question. Additionally, our company's websites contain some adverts which we are paid to display, but whose content is not selected by us, such as Google AdSense ads. For more detailed information, please see Advertising/Endorsements Disclosures

Our sites use cookies, some of which may already be set on your computer. Use of our site constitutes consent for this. For details, please see Privacy.

Click privacy for information about our company's privacy, data collection and data retention policies, and your rights.

Contact Us    About and Terms Of Use    Privacy    Advertising/Endorsements Disclosures