{"id":1681,"date":"2018-11-04T16:51:57","date_gmt":"2018-11-04T16:51:57","guid":{"rendered":"https:\/\/lab.florianschwarz.net\/PennController\/?post_type=yada_wiki&#038;p=1681"},"modified":"2018-11-07T15:04:41","modified_gmt":"2018-11-07T15:04:41","slug":"penncontroller","status":"publish","type":"yada_wiki","link":"https:\/\/lab.florianschwarz.net\/PennController\/wiki\/penncontroller\/","title":{"rendered":"PennController"},"content":{"rendered":"<p class='command-format'><code>PennController( ... )<\/code><\/p>\n<p class='command-format'>or <code>PennController( \"label\" , ... )<\/code> <em>(since version 1.0)<\/em><\/p>\n<p>The <code>PennController<\/code> command lets you write the script of your trials. You can use it in three environments: on its own to create a trial (since version 1.0), within <a href=\"#menu-toc-H1PennControllerTemplate\"><code>PennController.Template<\/code><\/a> to generate items from a spreadsheet, or within the definition of the Ibex variable <code>items<\/code> to create single elements.<\/p>\n<p>You pass a sequence of commands as its parameter to define the script of your trial. Optionally, you can also pass a string as the first parameter to give a label to your trial which you can refer to when defining the experiment&#8217;s sequence order in <code>shuffleSequence<\/code> or (since version 1.1) in <a href=\"https:\/\/lab.florianschwarz.net\/PennController\/wiki\/penncontroller-sequence\/\" class=\"wikilink-published\">PennController.Sequence<\/a>. If you specify no label string, the trial will be labeled <em>unlabeled<\/em>.<\/p>\n<p><strong>Example:<\/strong><br \/>\n[js try=&#8221;data&#8221; highlight=&#8221;1,8&#8243;]<br \/>\nPennController(<br \/>\n    newButton(&#8220;helloworld&#8221;, &#8220;Hello world!&#8221;)<br \/>\n        .print()<br \/>\n        .wait()<br \/>\n);<\/p>\n<p>PennController.Template(<br \/>\n    row => PennController( row.Type ,<br \/>\n        newButton(&#8220;button&#8221;, row.ButtonText)<br \/>\n            .print()<br \/>\n            .wait()<br \/>\n    )<br \/>\n);<br \/>\n[\/js]<\/p>\n<p>Creates one trial labeled <em>unlabeled<\/em> with a single button on the screen reading <em>Hello world!<\/em>, and generate one-button trials from a spreadsheet, assigning the text from its <em>Type<\/em> cells as their label and the text from its <em>ButtonText<\/em> cells as the button&#8217;s text (see <a href=\"#menu-toc-H1PennControllerTemplate\"><code>PennController.Template<\/code><\/a>).<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"wiki_cats":[13,5,4,33,35],"wiki_tags":[],"class_list":["post-1681","yada_wiki","type-yada_wiki","status-publish","hentry","wiki_cats-command","wiki_cats-documentation","wiki_cats-element","wiki_cats-global-command","wiki_cats-penncontroller-global"],"_links":{"self":[{"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/yada_wiki\/1681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/yada_wiki"}],"about":[{"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/types\/yada_wiki"}],"author":[{"embeddable":true,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/comments?post=1681"}],"version-history":[{"count":2,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/yada_wiki\/1681\/revisions"}],"predecessor-version":[{"id":1683,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/yada_wiki\/1681\/revisions\/1683"}],"wp:attachment":[{"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/media?parent=1681"}],"wp:term":[{"taxonomy":"wiki_cats","embeddable":true,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/wiki_cats?post=1681"},{"taxonomy":"wiki_tags","embeddable":true,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/wiki_tags?post=1681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}