Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 7:51 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: December 22nd, 2008, 10:25 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
SetINIFileData( SYSTEM_PUBLICATION_DIR + "Page1Status.ini", "Answers", "ButtonA", "true");


SetINIFileData is an opus script function which creates a text file on the computer hard disk.
The file name is Page1Status.ini
The file will be found in the SYSTEM_PUBLICATION_DIRECTORY...This is a system variable which stores the location of where your Opus publication will be installed when it is published, however, before it is published, it will place the file in the same directory as the Opus IMP file, so have a look for it there.
When you find the file, open it with any text editer and you will see
Code:
[Answers]
ButtonA=true
ButtonB=false
ButtonC=false
ButtonD=false


this is the structure of the file. and corresponds to the way the SetINIFileData function saves the data. There is a Section [Answers], and in this section, the state of the four buttons.

When you then use GetINIFileData...you can select which data you want to retrieve.

You can store this INI file anywhere, so if the publication is running from CD, you can still store the file on the users hard disk.

With Opus, you can create functions which can be placed in a Script object. In your quiz, you are dooing the same thing on every page, so you could create a function to do it. This would save a lot of programming.

You could also use a database for storing all the user responses, but the INI file is just a database.

You could do something similar using using actions.....Look at Storage actions. You can create CSV disk files, so that is an alternative, which you may prefer.

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: December 23rd, 2008, 3:02 am 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
:P Hy, Sandyn!

:lol: Thank you very much. Your help has been of great value.

I had already seen some things, both decided to follow some of his advice.

've Added a few lines of code that you sent me and excludes some options that had

been made through programmed activities of Opus.

I ask that you review my schedule and see where I am missing because

the Page continues losing the information selected when the user returns the same.

Do right to change the folder from publishing to test? Please check ...

The file attached to it.

Grateful. :roll:


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

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
 Post subject:
PostPosted: December 23rd, 2008, 11:26 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
you had a syntax error in your set/getINIFile statements. Even though the Opus window says 'expression OK'-----the final quote was shown in red, indicating a problem.

I would never write to a users C:drive outside the normal document or program file directory....... the user may not have access to that area and some people get very annoyed by doing that, so I have simply used the system variable called 'SYSTEM_DOCUMENTS_DIR'

I hope you are beginning to see the advantages of using some scripting. It is a steep learning curve, but well worth it.


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

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: December 24th, 2008, 3:22 pm 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
:) Hey Sandyn, how are you?

8) Following his advice, make some changes, changing the way the program for system_documents_Dir.

:? There are some errors, as the issues A,B,C or D, when user marks one of these alternatives, or changing the page and back, comes the following message:

:arrow: Action (14, 0): Undefined identifier 'SetINIFileData'.

:roll: What may be happening here?

:idea: Before switching, I was able to fix the value 0 for other answers, the wrong B, C and D, the lock buttons for the other options and hide the other answers when the User opt for one of the letters above, but the correct answer - A, not regulated in any way to change the page.

:!: I changed the path to the system_documents_dir, and now
I see all those errors to which I mentioned above.

:? I reedit this topic because experienced alternatives with and without the operator + after system_documents_dir. This operator is really essential?

:? Also tried to put the signs < and > before and after system_documents_dir, and that error message disappeared but annoying ...

In this case, the answers B, C and D were fixed, but the answer A, just to correct, should add one point to score the User is not fixed, when the page is changed.

:( What may be happening, any error in the way of variable CLICK_A add the point?

:) I am very grateful if you can examine the scripts, I believe to be progressing, but I still need very much your help.

:D Oh, before I forget, is Christmas here in Brazil, then, a happy Christmas to you and your family!


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

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
 Post subject:
PostPosted: December 27th, 2008, 1:24 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
I don't get the error you see?
You had changed the setINIFiledata statement. You omitted one of the parameters. You will need to use "SetINIFileData( FilePath, Section, Key, Value" You missed the 'Key' parameter ).

You were trying to save the data in the INI file, but then just using the local variable and not the retrieved data from the getINIFileData.

The '+' is required...it concatenates (joins) the file path and file name

Sandy


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

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: December 28th, 2008, 7:03 pm 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
:D Thanks Sandyn,

:( I was checking your changes and I confess that I'm lost, can not maintain the correct value for the question, where the letter A, and the answer lay in the navigation of the User.

:roll: I will be doing some tests and send the file to look at you ...

8) Grateful same .. see you later

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
 Post subject:
PostPosted: December 29th, 2008, 8:16 pm 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
:) OK, Sandyn and users of this forum - Start again ...

:? My big problem here is to set the answer chosen on each page and have their value added to the score.

:( How to do this through programming?

:wink: The wrong answers set the value at 0 and does not change the score in the navigation of the user.

:wink: Any one of the wrong choices are displayed on the page when the user navigates between pages.

:( The correct answer, you should add one point to score, is lost after when the user leaving the page.

:?: How to set the correct answer? As an example, the letter A in question 1 and letter C on the question two?

:? Choose the two correct answers on each page, go to page 3 and return to page 2 and page 1.

:shock: The correct choices disappear and this should not happen. How to solve this problem?

:shock: Moreover, as reset the score, if you give up and choose another answer, if not correct?

:cry: I hope some solution, my time to prepare the quiz is done and I can not fix this.

:wink: I am very grateful to those who achieve a solution.


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

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
 Post subject:
PostPosted: January 2nd, 2009, 9:59 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Have you looked at using the scoring actions? I haven't used them, but they may do what you want. You could use the scoring actions to keep a running total of the score and programming/INI file to keep track of the users answers. In this way, you would be able to move back/forward in your publication.

The scoring actions are added as actions to a buttoon press.
Sandy

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: January 2nd, 2009, 7:06 pm 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
:D Thanks for your tips, sandyn.

8) I would not add it through the programming. Ready with the actions I did, but I do not know how to reset the score of the question, if the user reset your response, canceling the previous chosen.

I :P appreciate the time and attention given to my problem.

:P Thanks!

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
 Post subject:
PostPosted: January 4th, 2009, 1:46 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Every time you load a page, if you read the INI file. from that, you can tell if a question has been answered on the page already. If the user changes their selection, then you can subtract the last score from the total and add the new one. If the user had not already chosen an answer, then you just add the new score to the total. You can use an 'IF' action too select the program fllow.

Have you done a flow chart for a page, it might help you to visualise what you need to do.

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: January 4th, 2009, 6:53 pm 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
:D Hello Sandyn.

:? In theory it is very functional, but in practice, how it works?

:? If you check the last file that I sent, you will see that the process is complicated.

:cry: To tell the truth, I am almost giving up the idea, which is regrettable because the user needs to go back and check the answers chosen, but the right answer is not fixed the page...

:? moreover, if the user change the answer and the score does not change is also critical!

:cry: I am in bad linen ...

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
 Post subject:
PostPosted: January 6th, 2009, 12:55 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Hey!! don't give up that easily!.

What you are trying to do is not very difficult, but would take a lot of code. I think you have made things more complicated for yourself by having too many things to look after.

I am in France for a week, so I will try to look over what you have done when I have time and come up with a few changes....perhaps start a new way of doing it. Start simple, get the process working, then look at the graphical bits.

I may start again using a database, just have one page and populate everything from the database.


Sandy

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: January 6th, 2009, 10:15 pm 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
Sandyn, thank you very much for the attention given to my problem.
I wish you a great trip and a happy 2009. Success in their work and in his personal life, with people you love.
Until more news ...

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
 Post subject:
PostPosted: January 14th, 2009, 3:06 pm 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
:D Guys, problem solved. This should turn tutorial.
:) Got up the quiz with 10 questions, all while maintaining the User's chosen response. In the tenth question, the quiz returns the first question for confirmation of the User.
8) A framework is also confirmed with response maintained after the confirmation of the response. Much work has to have variables for each question, for each page, but worth it.
:P The next step now is to fit it in random issues, perhaps involving bookmarks for each page.
:roll: In brief, post here the file for review by stakeholders.
Very grateful for the help and attention of everyone.

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
 Post subject:
PostPosted: January 24th, 2009, 6:37 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
While it seems this particular project is 'solved' and on its way, I came across another Post that might help others who are building Quiz or Question pubs.

This one looks like a gem and comes from Fred back in 2006... like good Wine, aging some. Check_Input2 .imp viewtopic.php?t=2041&highlight=text+input+select


I have never "seen" :shock: the Case thingy, or the Select thing. And while the Help file is "helpful", there's nothing like a Show-Me-How pub. Thanks, Fred.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC [ DST ]


Who is online

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