Please use our GitHub Issues page for all new support inquiries. If you need to contact us directly, please e-mail [email protected]

Is there a script I can create to run after a file is completely coded? I want the script to validate each cell's onset as the same as the preceding cell's offset.

asked 14 Jul '14, 08:50

m%20cunsolo's gravatar image

m cunsolo
accept rate: 0%

Sorry for the delayed reply. There definitely is a script that can do this. I've pasted the script below.

require 'Datavyu_API.rb'


  #Define the trial column name 
  #(This script will work for you if you change the name after getVariable to the column name that you are checking through)
  trial = getVariable('trial')
  tcells = trial.cells

  # Begin loop over the cells in the trial column
  for i in 0..tcells.length-2

    # Checks to make sure that adjanect cells have the same onset and offset
    if tcells[i].offset != tcells[i+1].onset
      # This prints the errors in the scripting console that opens automatically by running the script
      puts("offset in cell #{tcells[i].ordinal} is not the same as cell #{tcells[i+1].ordinal} onset")


permanent link

answered 28 Jul '14, 13:07

david's gravatar image

david ♦
accept rate: 4%

edited 28 Jul '14, 13:09

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 14 Jul '14, 08:50

question was seen: 3,608 times

last updated: 28 Jul '14, 13:09

powered by OSQA