Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 8th, 2025, 9:06 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Help with random pages
PostPosted: May 13th, 2005, 11:51 am 
Offline

Joined: March 21st, 2005, 2:32 pm
Posts: 6
My problem is as follows

I have twenty pages of questions that I want to show randomnly but only once.

How can i get the page list to stop and goto a finish score page when all twenty questions have been answered.

I generate the page list by using gotopage random from a start page, then i use the next random......is this correct

Thanks

Karl


For this message kbundy has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: May 13th, 2005, 3:08 pm 
Offline

Joined: November 3rd, 2004, 8:12 pm
Posts: 129
Location: New Brunswick, Canada
Opus: 8.6
OS: Win 8 (ASUS) - Win 7: (ASUS)
System: Asus - Windows 7 - 8 - Intel Core 3 - 4RAM - 16RAM
Karl,

Create a publication variable called PAGE_ON. This can be activated on the button you use to go to your first random question. Now add a page action to each question page that adds 1 to the variable PAGE_ON and a if action that when PAGE_ON equals 20 it goes to you designated page.

Note: computers start the count at 0.

LIT

_________________
Leo Taylor
Win XP Home / Opus Pro 7.01 & 6.4 / P4-2.8 / 1.5 GB RAM / ATI All-in-Wonder 9600 /160GB-HD


For this message Leo Taylor has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: May 13th, 2005, 4:12 pm 
Offline

Joined: March 21st, 2005, 2:32 pm
Posts: 6
I have done the following but I am sure that i have gone wrong somewhere as my button action does not go to the next random page.

Can you help

Image
Image

Ta


For this message kbundy has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: May 13th, 2005, 8:05 pm 
Offline

Joined: November 3rd, 2004, 8:12 pm
Posts: 129
Location: New Brunswick, Canada
Opus: 8.6
OS: Win 8 (ASUS) - Win 7: (ASUS)
System: Asus - Windows 7 - 8 - Intel Core 3 - 4RAM - 16RAM
Karl,

try using Else instead of the second If statement

If (PAGE_ON = 20) then
Go to Page "Score Page plus Percentage(2)"

Else Go to Page <Next Random>

When using IF, if the condition is not meet " =, less than, greater than, true or false, etc" you have to tell the program what you want it to do. This is where you would use Else.

(attached image shows what I have use)


You do not have the required permissions to view the files attached to this post.

_________________
Leo Taylor
Win XP Home / Opus Pro 7.01 & 6.4 / P4-2.8 / 1.5 GB RAM / ATI All-in-Wonder 9600 /160GB-HD


For this message Leo Taylor has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: May 14th, 2005, 2:32 am 
Offline

Joined: October 26th, 2004, 1:26 pm
Posts: 262
Hi Karl,

Leo is absolutely right to use 'else'.

However so you know "why" your actions were wrong, refer to the screenshot...

In yours, where you have:

if <PAGE_ON> is less than 20

...it is actually nesting from the first "if" condition, so it can only work when the first "if" condition PAGE_ON value equals 20.

Simply move the "if" condition, so it is not nested. (as demonstrated in the second part of the screenshot)

Using "else" as Leo said, is the logical thing to do, as then if the "if condition" is anything other than the value of '20' it will then trigger. ;)


You do not have the required permissions to view the files attached to this post.

_________________
Cheers,
Steve


For this message Steve H has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 51 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group