Source language: Translate to:

Create Mag

NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support

Create Mag

Postby Issam » Wed May 31, 2006 9:12 am

Dear Friends

I am A new comer to NeoBook. My knowledge of it as follow:
Upper constraction 90%, Under constraction 50% for the commands and 0%
for the variables.

I am trying to create a magazine like "zinio", with a decent turn page from right to left, so what I need from you my friends to help me
to do the following items:

a_Size: 1024 X 768 16M Colors.
b_Page Number: 86 pages.
c_Track Bar with 2 counters, one for the right pages and the other for the left pages.
d_Front Cover and Back Cover.

I think it's enough for this letter and in the next few days I hope
You will hear from me a positif answer.

Now what I need Is:

For question (a) it's ok
For question (b) it's also ok
But for (c) the problem begin. In NB the [P] give me page 1, but in
fact I have page 1 (right) and page 2 (left). In NB the [P] in the next page give me page 2, but in fact i have page 3 (right) and page 4 (left). What shall I do?
For questiob (d) I have the cover on my left and the right site is blank, how I shall cover or delete, or whatever to make this blank
area to disappear?

I am very sorry for this long letter I hope to hear from you as soon as
possible.
Yours,
Issam
Issam
 
Posts: 16
Joined: Tue May 23, 2006 8:37 am

Postby Neosoft Support » Thu Jun 01, 2006 9:46 am

Thank you for your interest in NeoBook. Here are some answers to your questions:

a. Size: 1024 X 768 16M Colors.


Yes, NeoBook publications can be just about any size, including 1024x768.

b. Page Number: 86 pages.


Yes, that's not a problem. The theoretical limit is approximately 30,000 pages. Although, I doubt it would actually be possible to create a publication of that size.

c. Track Bar with 2 counters, one for the right pages and the other
for the left pages.


Adding page numbers is an interesting problem. What we see as two facing pages, NeoBook sees as a single page. Adding a page numbers to NeoBook's single pages is relatively easy, but in order to simulate numbers for the facing pages, we have to get a little sneaky. Here's what I came up with:

1. Create a simple text object (the "A" icon in the tool palette).

2. Enter the following into the text object including the brackets:

[P1]

3. Click OK to save the object and position it on the left side if the master page. This will serve as the page number for the left pages. (You may need to adjust the text object's font, line, fill color, etc. to obtain the look you want.)

4. Create another simple text object and enter the following into its text area:

[P2]

5. Click OK and position this text object on the right side of the master page. This will serve as the page number for the right pages.

6. Select "Book Properties > Actions" from the Book menu.

7. Click the tab labeled "Page Change" and enter the following into the action editor:

SetVar "[P1]" "([PageNumber]*2)-1"
SetVar "[P2]" "[PageNumber]*2"

8. Click OK to save the changes.

9. Run your publication and you should now see page numbers.

d. Front Cover and Back Cover. For questiob (d) I have the cover on my left and the right site is blank, how I shall cover or delete, or whatever to make this blank area to disappear?


There is a sample publication included with NeoBook called "Book2.pub" that shows how to create a simple book with a front and back cover. Unfortunately, it's not possible to hide the blank portion of the covers.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Create Mag_Cont.

Postby Issam » Fri Jun 02, 2006 1:01 am

Dear neosoft Support

Thanks a lot for your fast reply, I study your (c) answer deeply and I
Found that the counters doesn't work perfectly.
I have a major problem: when I run the application the first page of NB: 1st Cover on left and blank on right, the 2 counters stay blanks.
But when I go Next (page_2 rigth and page_3 left) then I got 1 on the left counter [P1] and 0 on the right counter [P2].
In breif I have always a one step shift back.
I think the problem is in the Book Actions, in Page change Event. It's possible?
Thanks
Issam
Issam
 
Posts: 16
Joined: Tue May 23, 2006 8:37 am

Postby Cipolla » Fri Jun 02, 2006 5:27 am

Issam, i also noticed this odd think in the PageChange section. I wanted to give you the same tip, but neosoft was faster.

I have tested this in the Page properties and it is working fine.
You could also put the page-code in a subroutine, so you only need one line (Gosub "PageNumber") for every page.
Greetings from Germany
Klaus
User avatar
Cipolla
 
Posts: 166
Joined: Fri Apr 01, 2005 1:45 am
Location: Germany

Pagination from rigth to left

Postby Issam » Fri Jun 02, 2006 6:52 am

Dear Klaus

My turn page is from rigth to left.
First page in NB The pages [P1] , [P2] start blank.
For my Mag, the rigth side is blank, no design.
the left side is the cover and take the #1, but stay when I run the
application blank.
When I push the next btn I go to the next page in NB.
Now the counters give me the numbers #1 on left and #0 on rigth, but
in late step.
What I think the problem is in the start page.

I hope that you see my problem clearly

Thank Klaus
Issam
Issam
 
Posts: 16
Joined: Tue May 23, 2006 8:37 am

Postby Gaev » Fri Jun 02, 2006 7:05 am

Issam:

The suggestion from NeoSoft Support needs a slight modification to make it work as desired.

a) The commands in the Page Change section are invoked ONLY when you (user) attempt to go from one page to another ... so it does NOT get invoked when you start your pub ... hence initial values of [P1] and [P2] are NOT set.

b) When the Page Change section is invoked, the values of [PageNumber] is that of the Page you are moving From ... what you want is the Page you are moving To ... unfortunately, NeoBook only provides the Name of the Page you are moving To ... not its number ... and since the user could be navigating forwards or backwards, it is not possible to make a simple adjustment to [PageNumber]


So you have a number of choices ...

i) follow Klaus's suggestion ... and place a ...
Code: Select all
GoSub "RefreshPageCounters"
command in the PageEnter section of each of your pages (yes, all 86 of them) ... and then have a subroutine like ...
Code: Select all
:RefreshPageCounters
SetVar "[P1]" "([PageNumber]*2)-1"
SetVar "[P2]" "[PageNumber]*2"
... so everytime you navigate to a new page, this routine will be invoked with the correct [PageNumber] value.

If you choose this solution, make sure to remove the code in the Page Change section.


ii) a less labour intensive solution might be to have Button/Picture objects for user to click for navigating (i.e. prevent user from navigating via the PageUp/PageDown keys on the keyboard (this is an option in the Book properties).

Then, you can ...
Code: Select all
SetVar "[AdjustP]" "1"
GoToNextPage
for the button/picture for moving forward one page ...
Code: Select all
SetVar "[AdjustP]" "-1"
GoToPrevPage
for the button/picture for moving back one page ... and change the code in the Page Changed section to ...
Code: Select all
SetVar "[P1]" "[AdjustP]+([PageNumber]*2)-1"
SetVar "[P2]" "[AdjustP]+[PageNumber]*2"


Also, to compensate for the very first page, insert this in the StartUp section ...
Code: Select all
SetVar "[P1]" ""
SetVar "[P2]" "1"

And if you were planning on providing Buttons/Pictures for users to navigate directly to first and last pages of the magazines, you will need to pass different values for [AdjustP] (e.g. -9999 and +9999) and alter the Page Change section to check for these values first ... and if so, set the values of [P1] and [P2] accordingly.

Note to NeoSoft Support:
Might be useful to also provide a Global Variable called [PageChangeNumber] (to complement the [PageChangeName] value) to the commands in the Page Change section of the pub.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Counters Pages

Postby Issam » Fri Jun 02, 2006 7:57 am

Dear Gaev
I decide to follow Klaus's suggestion, and I placed "GoSub..." in the
PageEnter of each page.
So now where to put the 2nd Code: the Subroutine?

Thanks
Issam
Issam
 
Posts: 16
Joined: Tue May 23, 2006 8:37 am

Postby Wrangler » Fri Jun 02, 2006 8:19 am

You would put any subroutines under Books/Subroutines in the top menu. Some of your questions you could answer yourself by looking at the Neobook Help file. When learning Neobook, the Help file is your best friend.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

cher copain gaev

Postby Issam » Thu Jun 08, 2006 1:13 am

Dear Gaev

Let me first of all thank you a lot for the time, the knowledge and the
tender support that you give me recently, not like some others who accuse me that I search for some one to write my application for me.

I am not the young "Man" who profit from the efforts of the others (free of charge). I am a big artist and designer in my country, and I pay in advance all the fees of the others.

All the announcements on the internet say; ...with a just few cliks, you can make a professional job without knowing any programming...

I read the help many time I know every word of it, I make all the tutorials successfully, I Sink deeply in the examples. What I need is: where I put this command and how in a nocive manner once and you will see how I am fast learner.

Please stay beside me and you will not regret.


Your friend

Issam
Issam
 
Posts: 16
Joined: Tue May 23, 2006 8:37 am

Create Mag

Postby Issam » Thu Jun 08, 2006 3:22 am

Dear Gaev

About my Mag, I place a...
Code: Select all
  GoSub "RefreshPageCounters"

command in the PageEnter section of each of my pages...then I placed the subroutine like (but with a slight modification)
Code: Select all
 :RefreshPageCounters
     SetVar "[P1]" "([PageNumber]*2)-1"
     SetVar "[P2]" "([PageNumber]*2)-2"

and the result was perfect.

Thanks
Issam
Issam
 
Posts: 16
Joined: Tue May 23, 2006 8:37 am

Postby Gaev » Thu Jun 08, 2006 6:01 am

Issam:

a) You will find that the people on this forum are always willing to help others ... just browse/search the forum and you will see.

b) And not just about matters that are directly related to NeoBook scripting ... I have learned a lot about the nuances of graphics, audio, video, codecs, security etc. ... and all without asking a single question.

c) But in order to get the most out of this mechanism ... as others have said ... you may want to take a slightly different approach ... because perception is as important as reality.

- the NeoBook Help file is very comprehensive ... that should be your first "go to action" whenever you have a problem ... if people perceive that someone is asking questions that are easily found here, there might be a reluctance to help out ... to that end may I suggest ...

> make a shortcut on your desktop so you can open the Help file directly (and more shortcuts for NeoBookDB and any other plugins) ... clicking on "Help" from inside the IDE often does not give you a proper perspective

> and don't forget to use the Search facilities built into the Help Viewer


- the forum has a rich set of discussions over the last few years ... before you ask the same question that may have been discussed several times before, search the forum first

- if you want people to help, you want to craft your post to give the helpers as much information as you can ... can't tell you how frustrating it can be when five or six interactions later, the original poster identifies something new about his problem/requirement ... and the best way to get help is to identify what you did try ... and what problem(s) you encountered ... even if your approach was the wrong one


If people perceive that you have done your homework, defined your problem in detail and are having problems with something you tried ... you will find others more than willing to assist.

with a just few cliks, you can make a professional job without knowing any programming...
I guess it is back to perception ... you CAN make professional jobs without knowing programming ... perhaps just not the one you had in mind ... and scripting is NOT programming ... just a method of specifying what actions are to be taken in response to various user actions in an "english-like" (or French or Spanish) dialect.

Someone once said "we handle the difficult stuff easily ; the impossible takes a bit longer" ... and when you ask to solve a particular problem, people will use all the available tools to help you solve it ... and there is no better tool in NeoBook than its scripting facility.

In case you are overwhelmed/frustrated with the various features and facilities afforded by NeoBook, may I suggest that you ...

> look at all the sample pubs that come with NeoBook ... and study some of the tricks/techniques used in them

> perhaps start with a simpler project than the one you have embarked on ... to familiarize yourself with everyting the product has to offer ... baby steps first ... then training wheels ... before trying out for the Tour de France ... and remember, Rome was not built in a day.

<EndOfSermon> ... :-)
So now where to put the 2nd Code: the Subroutine?
... click on Menu Header called Book ... and then on Menu Item called SubRoutines ... and don't forget to read the Help file about SubRoutines.

By the way, you don't absolutely have to use SubRoutines ... you could have inserted the two SetVar commands in each of the (86) PageEnter sections ... after a while, you will learn that Subroutine are a more efficient way of doing things ... especially if down the road you wanted to make a change to the calaculations used in such a routine ... better to change it in one place than 86 places.
Code: Select all
:RefreshPageCounters
     SetVar "[P1]" "([PageNumber]*2)-1"
     SetVar "[P2]" "([PageNumber]*2)-2"
... looks like you are working on a middle eastern magazine ... where the information will be displayed/read from right to left.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: cher copain gaev

Postby dpayer » Thu Jun 08, 2006 6:28 am

Issam wrote:
Let me first of all thank you a lot for the time, the knowledge and the
tender support that you give me recently, not like some others who accuse me that I search for some one to write my application for me.

Issam


Issam,

I apologize if my words seemed like an accusation. That was not my intent. Most here are willing to share suggestions if you explain what you have tried and where you found a blocking point.

Best wishes for the success of your project.

David P.
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby Wrangler » Thu Jun 08, 2006 9:26 am

Well said, Gaev. That should be added to the Knowledge Base. Maybe a sticky on the main forum page?
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA


Return to NeoBook Knowledgebase

Who is online

Users browsing this forum: No registered users and 0 guests