Page 1 of 1

disable action?

PostPosted: Thu Feb 21, 2013 5:41 pm
by seanie
Hello Neobookers,

I make audio exams for my students with Neobook.

I usually control page changes by using a timer. However, some computers on campus are old/slow and the audio sometimes takes more 'juice' to start up than the timer... this means that on some computers, the pages would change too quickly.

To avoid this problem, I decided to cut the audio files to make them specific for each page, then link the page turns to the end of the audio: when audio ends, the page changes. I did this by inserting the following actions in Page Properties:

"F:\Exam 4\Pt1.mp3" "Wait"

This solved the 'slow computer' problem, but created another:

I want to put in Admin controls that allow a teacher to stop an exam, re-start it, or navigate to a specific part of the exam. However, when I re-start (the first page of the app does not have audio, just a button which the students press when they are ready to take the test), I can still hear the audio for the page that I jumped from. If I put in a button to stop the audio, the GotoNextPage command (above) kicks in.

So, my question is, Is there a way to go to another page in an app without triggering the actions which I put under Page Properties? Can I override or disable those actions somehow, or would my exam application be completely confused? :-)

If that's not possible, do you have any other suggestions for dealing with my slow computer issue? (I suppose I could go back to doing what I was doing before but add 30 additional seconds to each timer. The school could also buy better computers, but I have no control over that.)

Hope I have expressed myself well.

Re: disable action?

PostPosted: Fri Feb 22, 2013 12:09 am
by Neosoft Support
Change your page code to something like this:

PlaySoundFile "F:\Exam 4\Pt1.mp3" "Wait"
If "[StopExam]" "<>" "True"

Then when you want to stop the exam, you can do this:

SetVar "[StopExam]" "True"
StopMedia ""
GotoPage "Start"

Before restarting the exam, remember to clear the [StopExam] variable:

SetVar "[StopExam]" ""
GotoPage "whatever"

Re: disable action?

PostPosted: Fri Feb 22, 2013 3:13 pm
by seanie
Thank you very much! I don't quite understand how it works, but it does:-) I think I should study programming or something.

Re: disable action?

PostPosted: Sat Feb 23, 2013 7:20 am
by dpayer
seanie wrote:Thank you very much! I don't quite understand how it works, but it does:-) I think I should study programming or something.

If you are attempting to make apps and are reading this forum, you ARE studying programming! :)

Much of what I know, I gathered here plus other resource books I have read on my own. At times, I take on rather complex projects just to develop my own skills so I have the ability to do new things. Many of the functions I made that adapt vb/js scripts to NB were done for that purpose.

I think NB is a very good way to gain understanding about programming. Of course, the challenge is to become verbose in many languages. I'm still working on it.

David P.