{"id":199,"date":"2014-11-27T11:57:16","date_gmt":"2014-11-27T10:57:16","guid":{"rendered":"http:\/\/blogs.kent.ac.uk\/psychotech\/?p=199"},"modified":"2014-11-27T11:57:16","modified_gmt":"2014-11-27T10:57:16","slug":"e-prime-overriding-com-port-at-runtime","status":"publish","type":"post","link":"https:\/\/blogs.kent.ac.uk\/hsstech\/2014\/11\/27\/e-prime-overriding-com-port-at-runtime\/","title":{"rendered":"E-Prime: overriding COM port at runtime"},"content":{"rendered":"<p>If your E-Prime script uses the COM port, (typically if you&#8217;re using an SRBox) , then you will know that you have to code the port ID into the script. If you run your experiment on a different PC, the COM port ID may be different.<\/p>\n<p>If you&#8217;re not able\/don&#8217;t want to edit the source file, you can override it at runtime with a local config file.<\/p>\n<ol>\n<li>Create a textfile in the same folder as you E-Prime exp.<\/li>\n<ul>\n<li>\ninsert the following text:-<\/li>\n<p><code><br \/>\n&lt;?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?&gt;<br \/>\n&lt;StartupInfo&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;StartupInfoItem itemName=\"SRBOX.CommPort\"&gt;1&lt;\/StartupInfoItem&gt;<br \/>\n&lt;\/StartupInfo&gt;<br \/>\n<\/code>\n<\/ul>\n<\/ol>\n<p>save the file and then rename it to <code>my_exp_name.startupInfo<\/code>&nbsp;&nbsp;{replace my_exp_name with the identical name of your es2 file (without the .es2)}<\/p>\n<p>When you run your experiment, E-Run looks for a &#8216;.startupInfo&#8217; file with the same name as your experiment and uses its setting to override the current ones.<\/p>\n<p>NB: If you have E-Prime installed on you PC, then double-clicking on the &#8216;.startupInfo&#8217; file will automatically run the startupInfo editor program and this gives you a simpler way to edit the file= but if you don&#8217;t have this then just run notepad and open the startupInfo file in it and change the &#8216;1&#8217; to whatever port number you want.<\/p>\n<p>See the docs for other settings that can be changed in this manner.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If your E-Prime script uses the COM port, (typically if you&#8217;re using an SRBox) , then you will know that you have to code the &hellip; <a href=\"https:\/\/blogs.kent.ac.uk\/hsstech\/2014\/11\/27\/e-prime-overriding-com-port-at-runtime\/\">Read&nbsp;more<\/a><\/p>\n","protected":false},"author":2057,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/posts\/199"}],"collection":[{"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/users\/2057"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/comments?post=199"}],"version-history":[{"count":10,"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/posts\/199\/revisions"}],"predecessor-version":[{"id":220,"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/posts\/199\/revisions\/220"}],"wp:attachment":[{"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/media?parent=199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/categories?post=199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/tags?post=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}