Announcing the new Datavyu v1.3.6 with enhanced features and transcription support!

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
1111
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'

begin

  #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")

    end
  end

end
permanent link

answered 28 Jul '14, 13:07

david's gravatar image

david ♦
143235
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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×3

question asked: 14 Jul '14, 08:50

question was seen: 2,458 times

last updated: 28 Jul '14, 13:09

powered by OSQA