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

Hello,

I would like to write a script that creates a new cell with an onset of 45 seconds after the onset of a cell in that column.

The column is called "task_start" with the code "start." It currently only has one cell that marks the onset of the task.

I would like to create a new cell in that column with an onset of 45 seconds after the existing cell onset and an offset of 95 seconds after the existing cell onset. I would like the code for this cell to be marked "time2" Is this possible?

Thank you!

asked 30 Jun, 13:23

katethorson's gravatar image

katethorson
16114
accept rate: 0%


Here's a code snippet that should do what you want.


require 'Datavyu_API.rb'

task_column = get_column('task_start')
task_cell = task_column.cells.first()
ncell = task_column.new_cell()
ncell.onset = task_cell.onset + 45000
ncell.offset = task_cell.onset + 95000
ncell.start = 'time2'
set_column(task_column)
permanent link

answered 30 Jun, 14:09

Shohan%20Hasan's gravatar image

Shohan Hasan ♦♦
381126
accept rate: 11%

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:

×7

question asked: 30 Jun, 13:23

question was seen: 544 times

last updated: 30 Jun, 14:09

powered by OSQA