Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 2 of 2

Thread: Split / Special Countdown Timer

  1. #1
    Join Date
    Mar 2009

    Split / Special Countdown Timer

    A questionnaire is created that requires a specified time period has passed before the final trial can be reached. It is preferred that the user is only stopped to allow for the timer to catch up once they reach the trial before the end. If the user has taken more time to complete all the trials than the time specified, than the second to last trial is never reached.
    How can I go about implementing this with MediaLab?

    For this problem there are two possible solutions that I could think of -
    Using a duration parameter with the experiment for the questionnaire itself could allow for a solution that displays a timer - this timer could then be used to let the individual know that they are -not- to continue until the timer reaches 0; however this solution isn't quite ideal as the user has some control over whether or not they continue. An ideal solution to this problem through MediaLab would be a tad more complicated.

    I've attached a copy of the experiment. Quite a lot is going on within it. First, I'll go ahead and explain how the solution attached works.
    Basically, upon reaching the screen directly before the last screen, a countdown timer is presented to the user if they have not yet run-through the questionnaire for the specified interval of time. If the user has interacted with the questionnaire longer than the specified interval of time, then the screen with the countdown timer is never displayed. The second to last screen contains the countdown timer, optional text, and disallows the user from continuing forward (until the timer runs out).

    How was this accomplished?
    First, off - this type of project is probably around a 8/10 in terms of overall difficulty for a MediaLab task. To start out - you need to know how MediaLab can work with custom items, and how MediaLab can work with excel files.
    MediaLab's advanced features allow for the software to work directly with an excel worksheet. More information on this subject can be found here: http://www.empirisoft.com/medialab/h...d_features.htm
    As well as having the ability to work with excel worksheets, MediaLab has the ability to manipulate HTML files with MediaLab variables in -many- ways. More information on this functionality can be found here: http://www.empirisoft.com/medialab/h...stom_items.htm

    So - let's begin on a step by step explanation of how we were able to add this in:
    1. Using excel, I first made a worksheet that would allow for MediaLab to directly write in each time a variable was altered. For more information on how to do this, see the above links. The excel file must be named 'responses.xls' .

    2. Next, I used this worksheet to create and record separate pieces of data that would then be used at a different time. These variables include: time1 - time6. The variables time5 and time6 aren't quite necessary; however I used them for testing. The variables in these slots use a variety of locations to actively record the time at the start of the experiment, at the end of the experiment, and then subtract them by seconds into a single integer.

    3. Within the excel file this integer is tested to see whether or not two minutes (120 seconds) have passed (or whatever time you specify). If this time hasn't passed, MediaLab is told to SkipTo the a custom item. If the time has passed, MediaLab is told to SkipTo the end of the experiment.

    4. If the software moves to the custom item, the file 'Timer.html' is displayed. This file calls upon a variable swap by using ml.wording. Within the questionnaire file we tell ml.wording to take the place of a variable on the excel worksheet. This variable is then used to communicate to the HTML page how long the timer on it should exist. Using javascript (CountDown.js) we've allowed for a countdown timer to begin at whatever number of seconds is left before the user can remove their swab.

    5. Once this timer reaches 0, the page changes. MediaLab doesn't accept data from a custom item unless at least one field is filled in- so I included a checkbox that is by default set to be checked. There's most likely an easier way to accomplish this same effect (that is, rather than having a checkbox already checked). From here the user can press 'Continue' to move forward.

    Try the experiment out - let me know what you think or if you have any questions / comments. You may need to enable Excel's circular reference options for the spreadsheet being used. You can find more information on doing so, here: http://office.microsoft.com/en-us/ex...002851033.aspx

    Please let me know if you have any additional questions or if I can help in any way.
    Attached Files Attached Files
    Last edited by Trevor Newell; 11-06-2009 at 03:15 AM.

  2. #2
    Join Date
    Nov 2005
    edited from email followup
    Thank you so much for the time and thought that you put into this.
    You are right that I probably would not have been able to design this simply by following a set of instructions. This looks fantastic and is exactly what I was looking for. Thanks again for your help!

Similar Threads

  1. Countdown timer for a single question
    By jarvis24 in forum MediaLab Older Versions: How Do I...
    Replies: 5
    Last Post: 10-06-2010, 04:58 PM
  2. Display Timer: count UP rather than countdown??
    By curlieq in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 10-28-2009, 08:58 AM
  3. Countdown Timer
    By innernaut in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 02-05-2009, 12:17 PM
  4. split screen
    By raymondmar in forum MediaLab Older Versions: How Do I...
    Replies: 3
    Last Post: 05-15-2008, 03:45 PM
  5. Duration countdown parameter for scale items
    By JWellman in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 04-14-2008, 08:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts