Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 7:34 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Opus Script
PostPosted: April 2nd, 2005, 12:56 am 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

I have Opus Pro 04 XE and am trying to develop a registration page that can disable itself after the user registers the first time. With help, I have gotten the script completed for the registration button to validate the information the user inputs, to send me the info by e-mail and to then go to a page which starts the demo CD's content. So far, no problem. I've have this done.

But here's where the issue comes up. I want the user to be able to view the CD's contents multiple times (as often as they wish). The way it's set up now, they would have to re-register each time they want to again view the demo CD. What I would like is for the registration page, once completed and the info actually sent by e-mail, to not show again. After registering, I would like the user to be able to go directly into the CD content.

Unfortunately, I haven't been able to figure out how to do this. I suspect it will require some further Opus scripting, possibly addition of a variable (never did this, so not sure how). Or, perhaps, this bypassing a page after it is completed once, is not possible.

I would appreciate any ideas.

Thanks,
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: April 4th, 2005, 9:27 am 
Offline

Joined: October 25th, 2004, 12:27 pm
Posts: 526
Location: Digital Workshop
Hi,

Thank you for your enquiry.

As the values of variables are only 'remembered' whilst the publication is running, the only way a publication can know if a certain event took place before it was launched is if the previous publication stored information to a text file or registry key.

The simplest solution, therefore, would be to add a Write Data to Registry action after the current E-mail action (which mails you the registration data). Set the Text of this action to yes and set the Label to Registration.

Now add a Pre-Show trigger to the registration page of your publication, followed by a Read Data from Registry action. Set the Label to Registration and create a new variable (for example, named regcheck) to store the retrieved value.

You can now apply an If statement which checks to see if regcheck is equal to yes. If so, a Go To Page action can be used to take the user past the registration screen into the main body of the publication. If the regcheck variable is not equal to yes, the user has obviously not previously registered and no actions will take place (i.e; the registration screen will stay on-screen and will need to be completed).

You should find that this provides the required functionality. If you need to delete the registration information from the registry for testing purposes, simply click Start > Run, type regedit and click OK. Now navigate to HKEY_CURRENT_USER\Software\Digital Workshop\Opus Publication Data, then click on the folder with the long, cryptographic name (it will read something like f99a3099-7905-4771-9871-92b84ebee871). You should now be able to see the Registration key in the right-hand pane, which you can delete by right-clicking on the key and selecting Delete from the context menu.

Now close the Registry Editor and test your publication. It should no longer be able to find the Registration information in the registry and will behave as though regstration has not previously been submitted.

Kind regards,

_________________
Robin Garrett
Digital Workshop Technical Support


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 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