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

{iscorrectpassword} and Protected Pages Status


 
fatherunit Because I'm trying to use the same password # (not same password) for 5 different ebooks with the same ESBN (long story short: keeping same password # makes providing password for each ebook a LOT cleaner for the user), I've created two scripts, one that runs at application OPEN, the other at EXIT.

----Begin Script run at ebook OPEN----------------------
; This script looks in a file location, safe.txt, for a  password written when ebook run previously exited
; if the previously entered password is found, script copies the value to the ANS2000.ini file

MESSAGEBOX('Just entering script at OPEN, iscorrectpassword value: {iscorrectpassword} {linefeed}(1 = system perceives correct password entered, 0 = not set)')

FILEEXIST('XXExists','{tmp}\safe.txt')

IF({XXExists})
 FILEREAD('ReadStatus','InfoThatWasRead','{tmp}\safe.txt')
 MESSAGEBOX('safe.txt already existed, value in file: {InfoThatWasRead}')
ELSE
 FILEWRITE('CreateStatus','{tmp}\AF.txt','ZXZXZXZXZXZXZXZXZXZX')
 FILEREAD('ReadStatus','InfoThatWasRead','{tmp}\safe.txt')
 MESSAGEBOX('safe.txt did not exist, created it with ZXZXZX value')
ENDIF

IFSTRNOTEQUAL('{InfoThatWasRead}','ZXZXZXZXZXZXZXZXZXZX')
 INIWRITE('{InfoThatWasRead}','ANS2000.ini','{esbn}','PasswordE')
 MESSAGEBOX('Password written to ANS2000.ini, iscorrectpassword value: {iscorrectpassword} {linefeed}(1 = system perceives correct password entered, 0 = not set)')
ENDIF

----END Script run at ebook OPEN----------------------
----BEGIN Script run at ebook EXIT----------------------

; this script designed to be executed when user is exiting ebook
; This script looks in ANS2000.ini to see if the password was written (to unlock all pages)
; If the password exists in ANS2000.ini (as user is exiting), script copies and stores it to a safe location, safe.txt
; then the script clears the password field in ANS2000.ini

INIREAD('ExitPW','ANS2000.ini','{esbn}','PasswordE')
IFSTRNOTEQUAL('{ExitPW}','')
; ExitPW is not empty; write password to safe.txt to be read next time application OPENS

 FILEWRITE('WriteCreateStatus','{tmp}\safe.txt','{ExitPW}')
;  FILEREAD('ReadStatus','InfoThatWasRead','{tmp}\safe.txt')
  MESSAGEBOX('At Exit, ExitPW (written to safe.txt): {ExitPW}')

; then, clear password field in ANS2000.ini
 INIWRITE('','ANS2000.ini','{esbn}','PasswordE')

ENDIF
----END Script run at ebook EXIT----------------------

The scripts perform well, passwords are transferred properly, when correct password is entered, all protected pages "unlock" and are displayed as requested.

When the ebook is re-opened after the password has initially been entered, the password is correctly read from safe.txt, {incorrectpassword} value = 1, at first glance the ebook appears to be "unlocked", but when I click on a navigation button to display a previously protected page (protected without correct password, after correct password entered went to unprotected state in first ebook run), on the 2nd (and subsequent runs) the previously protected pages revert back to protected mode, complete with the personalized HTML conveying message that the user needs to purchase a password.

As you can see in the scripts, I'm reporting the {iscorrectpassword} value, and it reports a value of 1 after the password has been set, on the 2nd running of the ebook.  It's interesting because I've HTML coded my navigation buttons to "ghost" when {iscorrectpassword} = 0, and after I've put in the correct password, they correctly go to active / non-ghosted state (even on the 2nd running), but for some reason the Activ Ebook Compiler programming is not responding to the {iscorrectpassword} = 1 value, and is reverting to the protected page state, only on the 2nd and subsequent runnings of the ebook.

Perhaps there's another switch / variable that the protected status refers to? Suggestions?  Thank you.


Posted on: 5:12 pm on April 10, 2011
rlemire fatherunit;

I may be wrong -- but I think the {incorrectpassword} value is read only and can not be changed programmatically. If the Activ E-Book security could be ***** ed simply by modifying the ANS2000.ini file -- it wouldn't have much value would it.

For my HYPrLock system (using Activ E-Book) I've developed a completely unique "password" activation system.

With HYPrLock, authors are able to "sell" 5 different (ESBN) Activ E-Books with a shopping cart system. The HYPrLock code loops each purchase -- creating activation tokens for each eBook as required. After downloading and installing the eBooks a customer first enters a validation token (to validate a purchase) and then gets a password that he enters to unlock the eBook. Every eBook has it's own unique ESBN and contains it's own unique set of passwords.

With the HYPrLock system, customers can pick and choose which volumes or sets of volumes they want.

*The shopping cart code must be modified to work with HYPrLock.

Ron


Posted on: 5:41 pm on April 12, 2011

Go to Active Discussion Thread

Participate in Current/New Discussions

List All Archived Forums



Copyright © 2000-2015, 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.

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