PDA

View Full Version : Adding a timeout hit counter



Sap support
01-31-2002, 05:57 PM
Hi,

We have created a demo using Demoshield v6.71, the demo includes a test that after completing will print a certificate with the test results.

We want to know if there is anyway to get Demoshield to count the number of times the certificate has been printed and have the Demo "timeout" after a certain number of prints.

Any help is greatly appreciated,

Thanks

KimberlyH
02-01-2002, 02:29 PM
Yes, you can assign a Set Variable action to the Print button that will increment a Global Variable. With the Permanently Save Variables option selected within the Globals tab of the Demo Properties, DemoShield will create an .ini file to store the variable data. Each time the demo is opened, DemoShield will retreive the value of the Variable from the .ini file and use this during demo playback.

To set up your demo you can do the following:

In the button the user will click on to print the file, create a Set Variable action. Assign the Set Variable action to increment a Global Variable.

Next, in the first scene of your demo create an Event Object to check the value of the Variable.
To do this, open the Properties to the Event Object and go to the Object Styles tab.
Under the Condition heading select Always Perform True Actions and delete this.
Click on New to bring up the Condition Builder.
Select Custom from the Condition Type drop down.
Under Condition Description select <global variable/Object>
A drop down menu will appear under Condition Details.
Select Global Variable
Select the Global Variable you are incrementing from the second drop down.
Once you have selected this, click Apply.
Next, click on <Object property/constant>
Select Constant (Numeric) from the drop down under Condition Details.
Enter the maximum number of times the user can click on the Print button in the Edit Field.
Once you have done this, click Apply.

After you have created your Condition, click OK to close out of the Condition Builder.

Next, go to the Actions tab. Under the True Actions assign the actions you wish to occur if the user has selected the Print button the maximum number of Times. Under the False Actions assign the actions you wish to occur if the user has not used the maximum number of prints.

I hope this helps.

Sap support
02-04-2002, 12:58 AM
Great thanks for that Kim,

Works fine locally but when we write it to a CD it doesnt work (I guess the INI cant be created as the CD is read only).

Is there anyway to get Demoshield create the INI somewhere locally rather than trying to create it on the CD?

Thanks again Kim.

KimberlyH
02-04-2002, 10:08 AM
In the Demo Properties under the Options tab you can select the Save Data in Windows Directory to have DemoShield copy the .ini file to that location. When the demo is then played back, DemoShield will retreive the information from the Windows Directory.

I hope this helps.

Sap support
02-17-2002, 09:38 PM
Thanks again Kim,

I now have another problem, I have added a token to the print page to count and display the number of prints the user is making.

I cannot seem to get it to refresh immediatley, if I change scenes or start a new session it counts prints that have been made but I want to display as a certificate is printed.

KimberlyH
02-19-2002, 02:10 PM
I am assuming you are using a Quick Report Object to display the number of times the user has selected the print.

Unfortunately, the Quick Report Object is refreshed only at the beginning of the scene. Therefore, you would have to take the user to a new scene to display the updated number.

I would recommend the following:

If you are using a Global Variable to increment, you can display the value within two scenes using a Quick Report Object.
Create a duplicate of the print scene.
Then, assign a Go To Scene action and a Sent To Printer action within the button the user must click on.
For the Go To Scene action, take the user to the duplicate scene and the Quick Report will automatically be updated.

The user will not know that they are being taken to a new scene because it will look the same.

I hope this helps.

Sap support
02-19-2002, 05:50 PM
Thanks Kim,

I also used a Demoshield template which generated a test and a test result page.

At the moment the result page counts each attempted question so say you attempted 10 questions and got 5 wrong the result page says something like "You have tried 15 questions a total of 15 times"

What we want to do here then is just record whether the user got the question right on the first attempt regardless of how many attempts were made at it.

Whats the easiest way to do this?

Thanks again

Sap support
02-19-2002, 05:59 PM
Thanks Kim,

I also used a Demoshield template which generated a test and a test result page.

At the moment the result page counts each attempted question so say you attempted 10 questions and got 5 wrong the result page says something like "You have tried 15 questions a total of 15 times"

What we want to do here then is just record whether the user got the question right on the first attempt regardless of how many attempts were made at it.

Whats the easiest way to do this?

Thanks again

KimberlyH
02-22-2002, 09:49 AM
Are you allowing the user to retake the quiz or to be able to go back and change answers after they have already submitted thier response?

If you could provide more details as to how your demo is set up it would be easier to determine the best way to incorporate a counter.

All the best,

Sap support
02-24-2002, 05:41 PM
Hi Kim, we are using the template quiz generated by Demoshield but our end aim is to just record whether the user got the question right on the first attempt regardless of how many attempts were made at it. Also we want it to be mandatory that the user completes all questions before they can view the quiz results.

I need to know how to change the template to achieve this.

Thanks

KimberlyH
02-25-2002, 02:27 PM
I would create a duplicate of the submit button the user must click on after they have made their selection. The first submit button will be used to keep track of their initial selection. Then, when the user gets to the scene where they can view their score, you can disable and hide the initial submit button, then show and enable the duplicate submit button. Set up the duplicate submit button to increment different variables so you can keep track of the initial score.

I hope this helps.

Sap support
02-26-2002, 07:19 PM
Hi kim,

Thanks I got around this by disabling the EValuate question variable when a question is answered correctly.

I have a new dilema, I store the question results in global variables (as there are 60 questions throughout the demo) as well as the number of prints made (we want the demo to disable printing after x amount of prints have been made while leaving the rest of the demo active).

To disable the printing there is an event quick performs a check on the global variable that stores the number of prints that have been made and disables the test results scene when that number has been reached.

We have selected the "Permanently save variable" option in the demo properties along with the "Store information in the Windows directory) however this appears to be storing the question results as well as the number of prints that have been made.

So when a user goes in to attempt a test, results from the previous session appear in the test results scene.

How can I store just the global variable used for counting the number of prints made without retaining the test results as well?

Thanks

KimberlyH
02-27-2002, 11:28 AM
When selecting the Permanently Save Variable option within the Global Variable properties, DemoShield will save all the Global Variables.

To work around this, you can create an Event Object at the beginning of the demo that will trigger a Perform Calculation action to set the value of the other variables back to their original state. This way, the next person that runs the demo will have a clean demo, but the Global Variable that holds the print value will still be there.

I hope this helps.

Sap support
03-06-2002, 01:45 AM
Thanks for that Kim,

My global variables are now clearing each session. I have one other variable within a scene that captures the users name and stores it (it was created using the Demoshield quiz template).

I cannot seem to get this variable to clear each session.

Any ideas?

Thanks