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:

New PRoblem


 
Grandmaster I've written you an email already on this problem just moments ago.  The email entitled, "Major Problems"....
There is obviously a bug somewhere in the new program 4.21... I've never had this problem with 4.01.
But it caused 4.01 to say that it is now unregistered as well.

Posted on: 8:51 am on April 9, 2002
Grandmaster I'm happy to announce that the Active Recovery System works.
I had to use it tonight (or this morning rather since it's 3:40 a.m.) I wasn't going to give up until I found my user ID and registry keys.
I was panicking for a while but I'm cool now.

While I'm here, I'd like to announce that I've actually written a database program with the ebook compiler.
No lie.
It actually saves information and digs it back up. I wrote for my brother n law that is a sales agent for National Motor Club. He wanted a database type program that prints out his customers by city and by individual basis as well. He asked and I delivered.
I did it with Active Script in the 4.21 version compiler.

Now I'm making another more complex program.  This one might take me awhile but I confident that Active Script can do the job.

If anyone has any questions on the scripts and how I did it, I'll be more than happy to share this information with you.

Scott


Posted on: 9:40 am on April 9, 2002
Warzoner Grandmaster,
I would be interested in this. Feel free too email or post back here. I am especially interested in these types of programs.

Posted on: 7:52 pm on April 14, 2002
Grandmaster Here's one of the scripts that I'm using in one of the databases that I'm building now.  
FILEEXIST is having a problem working though. I don't know if it's the way I've scripted it or if it's a problem with the new compiler with this particular file statement.
Here's the whole code called writefile.as

SET('bok',0)              
REM retrieve fields from form in Activ Variables of same name
                      FSET('fname','fname')
                      FSET('fname2','fname2')
FSET('fmi','fmi')
                      FSET('faddress','faddress')
                      FSET('fcity','fcity')
                      FSET('fstate','fstate')
                      FSET('fzip','fzip')
FSET('fplan','fplan')
FSET('fgroup','fgroup')
FSET('appdatemonth','appdatemonth')
FSET('appdateday','appdateday')
FSET('appdateyear','appdateyear')
FSET('faddmem1','faddmem1')
FSET('faddmem2','faddmem2')
FSET('faddmem3','faddmem3')
FSET('faddmem4','faddmem4')
FSET('faddmem5','faddmem5')
FSET('faddinfo','faddinfo')
SET('lastfirst','{fname2}, {fname} {fmi}')
SET('firstlast','{fname} {fname2}')
SET('filename','{fname}{fname2}')

SET('filepathb','C:\Program Files\National Motor Manager\{fcity}.as')
SET('longstr3','<BODY BGCOLOR="white"><H2><CENTER>{city}</CENTER></H2><BR><BR><B>{longstr2}</B>')

                      REM build a long string of the text
                      SET('longstr','<H2><CENTER>{lastfirst}</CENTER></H2><P><FORM ACTION="#!writefile2.as" METHOD="POST"><CENTER><P ALIGN=CENTER><TABLE WIDTH="100%" CELLPADDING="2" CELLSPACING="0" BORDER="0"><TR><TD WIDTH="50%" VALIGN=TOP><CENTER><P ALIGN=CENTER><B>First Name</B><BR><INPUT TYPE=TEXT NAME="fname" VALUE="{fname}" SIZE="32" MAXLENGTH="32"></P></CENTER><CENTER><P ALIGN=CENTER><B>Address</B><BR><INPUT TYPE=TEXT NAME="faddress" VALUE="{faddress}"SIZE="32" MAXLENGTH="32"></P></CENTER><CENTER><P ALIGN=CENTER><B>State</B><BR><INPUT TYPE=TEXT NAME="fstate" VALUE="{fstate}" SIZE="2" MAXLENGTH="2"><BR><I>(2 word Abbrev.)</I></TD><TD WIDTH="50%" VALIGN=TOP><CENTER><P ALIGN=CENTER><B>Last Name</B><BR><INPUT TYPE=TEXT NAME="fname2" VALUE="{fname2}" SIZE="32" MAXLENGTH="32"></P></CENTER><CENTER><P ALIGN=CENTER><B>City</B><BR><INPUT TYPE=TEXT NAME="fcity" VALUE="{fcity}" SIZE="32" MAXLENGTH="32"></P></CENTER><CENTER><P ALIGN=CENTER><B>ZIP</B><BR><INPUT TYPE=TEXT NAME="fzip" VALUE="{fzip}" SIZE="10" MAXLENGTH="10"></TD></TR><TR><TD WIDTH="50%" VALIGN=TOP><P ALIGN=CENTER>&nbsp;</P><CENTER><P ALIGN=CENTER><B>Plan #</B><BR><INPUT TYPE=TEXT NAME="fplan" VALUE="{fplan}" SIZE="4" MAXLENGTH="4"></TD><TD WIDTH="50%" VALIGN=TOP><CENTER><P ALIGN=CENTER><B>Additional Member Names</B><BR><INPUT TYPE=TEXT NAME="faddmem1" VALUE="{faddmem1}" SIZE="32" MAXLENGTH="256"><BR><BR><INPUT TYPE=TEXT NAME="faddmem2" VALUE="{faddmem2}" SIZE="32" MAXLENGTH="256"><BR><BR><INPUT TYPE=TEXT NAME="faddmem3" VALUE="{faddmem3}" SIZE="32" MAXLENGTH="256"><BR><BR><INPUT TYPE=TEXT NAME="faddmem4" VALUE="{faddmem4}" SIZE="32" MAXLENGTH="256"><BR><BR><INPUT TYPE=TEXT NAME="faddmem5" VALUE="{faddmem5}" SIZE="32" MAXLENGTH="256"></TD></TR></TABLE></P></CENTER><CENTER><P ALIGN=CENTER><B>Additional Information</B><BR><TEXTAREA NAME="faddinfo">{faddinfo}</TEXTAREA><BR><BR><BR><INPUT TYPE=SUBMIT VALUE="Click here to save update"><INPUT TYPE=RESET VALUE="Clear {fname} {fname2}"></P></CENTER></FORM><BR><P ALIGN=CENTER><applet CODE="ButtonPLUS3.class" WIDTH="123" HEIGHT="18"><param name="HIGHLIGHT" value="3"><param name="TEXTALIGN" value="center"><param name="FONTNAME" value="TimesNewRoman"><param name="URL" value="index.html"><param name="FONTSIZE" value="12"><param name="TEXT" value="Main Menu|Goodbye {fname}|Good Sale"><param name="BGCOLOR" value="21,54,59"><param name="TEXTCOLOR" value="225,225,225"><param name="SOUND" value="ring.au|ri.au"></applet></P></CENTER><P>')
SET('longstr2','<P><CENTER><B>{lastfirst}</B><BR>{faddress}<BR>Members under {fname} {fname2}<BR>{faddmem1}<BR>{faddmem2}<BR>{faddmem3}<BR>{faddmem4}<BR>{faddmem5}<P>')

REM (This is where the trouble begins)

                      FILEEXIST('rexist','{filename}.as')
IF({rexist})
MESSAGEBOX('{firstlast} is already on file. Go To Main Menu to Edit This Member')
                       END
                       ELSE
                      FILESAVEPROMPT('bsave','filepath','Save New Member','C:\Program Files\National Motor Manager','{filename}.as')
                      IF({bsave})
                            FILEWRITE('bok','{filepath}','{longstr}')
                            IF({bok})
                                    MESSAGEBOX('{firstlast} is saved to file!')        
                            ELSE
                                    MESSAGEBOX('File save error. {firstlast} was not saved to file!')
                            ENDIF
                      ENDIF
      ENDIF

      FILEREAD('cread','city','{fcity}.as')
IF({cread})
STRFIND('sv1','city','{lastfirst}')
IF({sv1}=0)
FILEWRITE('bok','{filepathb}','{longstr3}')
IF({bok})
MESSAGEBOX('{firstlast} is saved to {fcity} {fstate} file!')
ELSE
MESSAGEBOX('File save error')
MESSAGEBOX('{firstlast} was not saved to {fcity} {fstate} file')
ENDIF
ENDIF
ENDIF

I copied and pasted it so the variable {longstr} is not copied correctly because I have it as one long string in the file with no line breaks. That part works fine.

It's the FILEEXIST statement.  Maybe someone can help me out here.

Scott


Posted on: 8:13 am on April 15, 2002
EBookCompiler I am pretty sure that FILEEXIST is okay because all those bookmark scripts (and there are a bunch of them floating around) work on all versions since 4.00. and depend on it working

For FILEEXIST('rexist','{filename}.as')  this should set {rexist} to 1 if the file exists, 0 if not

{filename}.as  needs to be a full path (including drive letter, folder name etc.) to a file

To debug, maybe add just before it to see what file name you are checking for?

MESSSAGEBOX('{filename}.as')



Posted on: 12:36 pm on April 15, 2002
Grandmaster ARGGGG... I knew that..... what was I thinking of....
I could kick myself for forgetting that.
I did this:

SET('appath','C:\Program Files\Application Name\')
FILEEXIST('rexist','{appath}{filename.as}')
IF ({rexist})
    MESSAGEBOX('This file already exists')
    END
ELSE
    FILESAVEPROMPT('.......... ETC ETC ETC..

This worked perfectly....
Ya know, with a little imagination, there is so much that you can do with Active Script.
After I complete this newly revised program for my bro-n-law, I'm going to try something else that require me to add in some euphoria programming assistance.

Has anyone here ever tried Euphoria programming language. It's pretty simple and it's cross platformed as well.

BTW.... Thanks again Sun.... your a life saver.


Posted on: 3:47 am on April 16, 2002
Grandmaster Ok... now I've got a new problem:
In my attempt to use MESSAGEBOX2('sv1','text to display','52')
I keep getting an error message that indicates that I must use a numerical expression in this area.  
I've exhausted all options that I can think of.

I know sv1 is suppose to indicate which button is pressed which in this case will be either yes or no.

How do I make this work?


Posted on: 5:26 pm on April 16, 2002
EBookCompiler Take out the single quotes around 52 (so it is a number not a piece of text)

I just tried this on 4.22 and it works on that version doing like this.  I assume it would on previous versions too.


Posted on: 9:38 pm on April 16, 2002
Grandmaster I finally figured it out shortly after I posted earlier. I also found out that (and correct me if I'm wrong or please explain why this is) that java class files that are included need to be included in the same directory but outside of the exe file on the install of someone elses computer.

I found this out earlier today when I downloaded this particular program on a friends computer.  The java navigational buttons were empty links as if the class file associated with them wasn't present.
So when I went to re compile the whole thing in Inno Setup compiler, I not only compiled the class files and java files inside of the ebook program but as included files along with the ebook program in the Inno setup program.
I haven't had a chance to see if this works yet or not, but I'm hoping that it will.
I don't know how to associate an applet tag with a directory in front of it, (unless I do what I've done for other .as files... SET a variable to the directory:
SET('s1','C:\direcotry file\')
and place the variable in front of the applet somehow or even turn the applet string into a active long string variable... I don't know....
I'll have to experiment with this.
What do you think Sunil?


Posted on: 6:44 am on April 17, 2002
EBookCompiler It depends on the applet

Most applets have a bunch of attributes, plus there is codebase which you can link to the class file and embed the applet and associated files in the ebook using this method

If the applet depends on a particular and complex folder structure, the best way is probably to use an installer to put the applet in the same folder as the ebook and use the preprocessor [={app}] in the parameters.

I think there may also be a few applets which only work on web sites.  This is not anything to do with being an e-book, but simply the author of the applet coded it that way, presumably deliberately.


Posted on: 1:56 pm on April 17, 2002
Grandmaster I'll try those methods out for sure.
How about this:
put the applet code in an .as file and write the script into the html with an include which points to the directory where it is? Perhaps using the 'addin' method would work as well.

On using the preprocessor[={app}]... is [={app}] equal to <applet code> or is [={app}] equal to the directory where the class file is

BTW... I don't see to many people discussing Active Script in the forums. Personally, the main reason I made the purchase was because of Active Script.  It's so easy to learn. I would like to see more people using and discussing it in the future. I'm going to play with it a good bit on different projects and see just how far powerful it can be.
That's why I built the simple database with that instead of using Euphoria.
When I get pretty good at it, if it's alright with you, maybe I can be of some help to some people in the forums that need help with active script. But like I say, I've gotta get proficient at it first.

On that, I've decided to devote my forum signature to Active Script. Hope you like it

Scott

(Edited by Grandmaster at 4:57 pm on April 17, 2002)


Posted on: 4:39 pm on April 17, 2002
EBookCompiler [={app}] is the directory where the ebook EXE is which is what I think you wanted, so I guess it appears in CODEBASE= or and/or some of the params for your applet

And yep I think that method you describe would probably work as well, although I haven't tried it.   I tend to use the preprocessor a lot (mainly to include common headers across many pages, but occassionaly for more) as this can save a huge amount of time.

Yep I agree it would be nice to discuss Activ Script more.  A lot of users are writers rather than technical experts, so I think this is probably why many people don't use it that much or at all.  I've been gradually building up a little collection of example scripts as well, so look out for this in future

I think also maybe the forms feature, which is new will make more people interested in it.

Also, I think the other issue is a lot of people simply don't know what is possible so never explore the possibilities in the first place.  Even I am pretty amazed at the database app you have done, as this is not something I would have even thought about!


Posted on: 7:03 pm on April 17, 2002

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