﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 4  » Presenting stimuli of absolute sizes (e.g. in cm)</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Sat, 04 Apr 2026 10:37:46 GMT</lastBuildDate><ttl>20</ttl><item><title>Presenting stimuli of absolute sizes (e.g. in cm)</title><link>https://forums.millisecond.com/Topic14608.aspx</link><description>Sometimes it is necessary to make sure all presented stimuli are of the same absolute size (e.g. a square with width/height of 4cm) on different monitors. In order to accomplish this, a calibration procedure is needed to calculate the pixel to (e.g.) mm&amp;nbsp; ratio on the monitor a script runs on.&lt;br/&gt;&lt;br/&gt;Attached to this message is such a calibration script (Inquisit 4). The zip-file includes one script "AbsoluteSizing.iqx" with the actual calibration procedure and an example script "SizingDemo.iqx" to demonstrate how to use the calibration script to produce a square of a particular size (e.g. 5cm). &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Here is an overview of how the calibration procedure works (the same information is also included in the scripts themselves):&lt;/span&gt;&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;(1) &amp;lt;include&amp;gt; script "AbsoluteSizing.iqx"&lt;/strong&gt;&lt;br/&gt;The code of the calibration script "AbsoluteSizing.iqx" can be be included into any other script (e.g. SizingDemo.iqx) using:&lt;br/&gt;&lt;span&gt;[code language="xml"]&lt;/span&gt;&lt;span&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/file = "AbsoluteSizing.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;[/code]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;All the elements of "AbsoluteSizing.iqx" are then accessible to the script (e.g. SizingDemo.iqx) and do &lt;span style="text-decoration: underline;"&gt;not&lt;/span&gt; have to be re-written.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;(2) Calibration Procedure: Underlying idea&lt;/strong&gt;&lt;br/&gt;The general idea of the calibration procedure itself is to adjust a given line on the monitor screen to be as long as the short side of a US letter-sized piece of paper (8 1/2 inches or ~21.6cm ).&amp;nbsp; The calibration instructions on the screen read as follows:&lt;br/&gt;&lt;br/&gt;&lt;span&gt;[code language="xml"]&lt;/span&gt;&lt;span&gt;&lt;font face="Courier New"&gt;&lt;font face="Arial"&gt;&amp;lt;item instructions&amp;gt;&lt;br/&gt;/1 = "Take an 8 1/2 x 11 inch paper (US Letter Size) and &lt;br/&gt;adjust the line on your screen to be 8 1/2 inches (~21.6cm) long.&lt;br/&gt;&lt;br/&gt;To increase the line: press '&amp;gt;' on your keyboard&lt;br/&gt;To decrease the line: press '&amp;lt;' on your keyboard&lt;br/&gt;&lt;br/&gt;When you are done, press &amp;lt;ENTER&amp;gt;."&lt;/font&gt;&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;/font&gt;[/code]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;(3) Calculation of 'pixel per mm' ratio&lt;/strong&gt;&lt;br/&gt;This calibration procedure results in calculating the ratio of pixels per mm on the current monitor: &lt;br/&gt;&lt;br/&gt;&lt;span&gt;[code language="xml"]&lt;/span&gt;&lt;span&gt;&amp;lt;expressions&amp;gt;&lt;br/&gt;/ratio_pxpermm = values.linelength_px/215.9&lt;br/&gt;&amp;lt;/expressions&amp;gt;[/code]&lt;/span&gt;&lt;br/&gt;Values.linelength_px is the final length of the comparison line in pixels when it measured 8 1/2 inches or 215.9mm.&lt;br/&gt;&lt;br/&gt;NOTE: If the pixel to &lt;span style="font-style: italic;"&gt;inches&lt;/span&gt; ratio should be calculated instead, the expression would need to be edited to: /ratio_pxperinch = values.linelength_px/8.5&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;(4) Definition of stimuli of absolute sizes&lt;/strong&gt;&lt;br/&gt;To present a stimulus of a certain size, the stimulus sizes need to be &lt;span style="text-decoration: underline;"&gt;&lt;span style="font-style: italic;"&gt;explicitly&lt;/span&gt;&lt;/span&gt; coded in pixels. &lt;br/&gt;&lt;br/&gt;Take, for example, the square of "SizingDemo.iqx".&lt;br/&gt;Under Editable values, the size of the square is defined as: &lt;br/&gt;&lt;span&gt;[code language="xml"]&lt;/span&gt;&lt;span&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/squaresize = 50&lt;br/&gt;&amp;lt;/values&amp;gt;[/code]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;with values.squaresize setting the desired size of the square to 50mm (5cm). Because the calibration script calculates the pixel/mm ratio it is necessary to set the absolute sizes in mm (and not inches or cm or anything else). If the calibration script calculates the pixel/&lt;span style="font-style: italic;"&gt;inch&lt;/span&gt; ratio instead, the absolute sizes need to be coded in inches.&lt;br/&gt;&lt;br/&gt;The square itself is coded as follows. Note the width and height definitions: they are written &lt;span style="text-decoration: underline;"&gt;&lt;span style="font-style: italic;"&gt;explicitly&lt;/span&gt;&lt;/span&gt; in pixel units (px). The product of (values.squaresize x expressions.ratio_pxpermm) calculates the pixel length that a square of 50mm requires on the current monitor.&lt;br/&gt;&lt;br/&gt;&lt;span&gt;[code language="xml"]&lt;/span&gt;&lt;span&gt;&amp;lt;shape square&amp;gt;&lt;br/&gt;/shape = rectangle&lt;br/&gt;/width = 1px * values.squaresize * expressions.ratio_pxpermm &lt;br/&gt;/height = 1px * values.squaresize * expressions.ratio_pxpermm&lt;br/&gt;/color = blue&lt;br/&gt;/position = (50%, 50%)&lt;br/&gt;&amp;lt;/shape&amp;gt;[/code]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;And that's it. More information is included into the demo scripts. If you have any further questions, please, let us know.&lt;br/&gt;&lt;br/&gt;cheers,&lt;br/&gt;katja from Millisecond Software</description><pubDate>Sat, 15 Apr 2017 04:18:40 GMT</pubDate><dc:creator>katbo</dc:creator></item><item><title>RE: Presenting stimuli of absolute sizes (e.g. in cm)</title><link>https://forums.millisecond.com/Topic21340.aspx</link><description>&lt;div data-id="21334" class="if-quote-wrapper" unselectable="on" data-guid="1492255118334"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21334" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="21334" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="21334" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Friday, April 14, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21334"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21333" class="if-quote-wrapper" unselectable="on" data-guid="1492255118334"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21333" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="21333" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="21333" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;&lt;a href="mailto:jm560@sussex.ac.uk"&gt;jm560@sussex.ac.uk&lt;/a&gt; - Friday, April 14, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21333"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="18726" class="if-quote-wrapper" unselectable="on" data-guid="1492255118334"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="18726" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="18726" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="18726" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, March 28, 2016&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-18726"&gt;&lt;div class="if-quote-message-margin"&gt;The approach for position is the same as for size. You'll probably want to take the center of the screen as your anchor and compute the absolute position of the left and right stimulus relative to the center.&lt;br/&gt;&lt;br/&gt;Attached is a modification of the original example from this thread. In addition to the square, a circle is displayed. The distance between the center of the square and the center of the circle is 10cm.&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ squaresize = 50&lt;br/&gt;/ distance = 100&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape square&amp;gt;&lt;br/&gt;/shape = rectangle&lt;br/&gt;/width = 1px * values.squaresize * expressions.ratio_pxpermm &lt;br/&gt;/height = 1px * values.squaresize * expressions.ratio_pxpermm&lt;br/&gt;/color = blue&lt;br/&gt;&lt;strong&gt;/ hposition = 1px * (display.canvaswidth/2) - (values.distance/2) * expressions.ratio_pxpermm&lt;/strong&gt;&lt;br/&gt;/ vposition = 50%&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape circle&amp;gt;&lt;br/&gt;/shape = circle&lt;br/&gt;/width = 1px * values.squaresize * expressions.ratio_pxpermm &lt;br/&gt;/height = 1px * values.squaresize * expressions.ratio_pxpermm&lt;br/&gt;/color = green&lt;br/&gt;&lt;strong&gt;/ hposition = 1px * (display.canvaswidth/2) + (values.distance/2) * expressions.ratio_pxpermm&lt;/strong&gt;&lt;br/&gt;/ vposition = 50%&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="18726"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Hi,&lt;br/&gt;I have been using this very helpful post on calibrating stimuli so that they appear the same size across different screens/resolutions. It works perfectly for my picture stimuli but I can't work out how to do it for my text stimuli. I have letters on a screen that I need to appear at a constant size (1cm). I have posted below what that part of script looks like. At the moment this just seems to change the position. I've tried to put the reszing code where the fontsize is defined and the script will not run. If I set the text size in pt would this be constant across screens?&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/squaresize = 50&lt;br/&gt;/imageheight= 30&lt;br/&gt;/imagewidth = 30&lt;br/&gt;/lettersize = 10&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text Ll1filler&amp;gt;&lt;br/&gt;/ items = ("O")&lt;br/&gt;/ fontstyle = ("Arial Black", 2%, false, false, false, false)&lt;br/&gt;/ txcolor = darkgray&lt;br/&gt;/ select =sequence&lt;br/&gt;/ txbgcolor = black&lt;br/&gt;/ position = (50%, 37%)&lt;br/&gt;/ size = (1px * values.lettersize * expressions.ratio_pxpermm)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;I also want to make the location of the letters constant across screens - I have tried using the same approach as previously asked but it keeps displaying the following error messages,&lt;br/&gt;/2 is not a valid attribute.&lt;br/&gt;Expression '1px*(display.canvaswidth/2' is invalid. Unmatched parenthesis.&lt;br/&gt;&lt;br/&gt;&amp;lt;text Ll1filler&amp;gt;&lt;br/&gt;/ items = ("O")&lt;br/&gt;/ fontstyle = ("Arial Black", 2%, false, false, false, false)&lt;br/&gt;/ txcolor = darkgray&lt;br/&gt;/ select =sequence&lt;br/&gt;/ txbgcolor = black&lt;br/&gt;/ position = (1px * (display.canvaswidth/2) - (values.distance/2) * expressions.ratio_pxpermm, 1px * (display.canvaswidth/2) - (values.distance/2) * expressions.ratio_pxpermm)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;Any help would be appreciated!,&lt;br/&gt;Thanks&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21333"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;&amp;lt;text Ll1filler&amp;gt;&lt;br/&gt;/ items = ("O")&lt;br/&gt;/ fontstyle = ("Arial Black", &lt;strong&gt;expressions.fontsize&lt;/strong&gt;, false, false, false, false)&lt;br/&gt;/ txcolor = darkgray&lt;br/&gt;/ select =sequence&lt;br/&gt;/ txbgcolor = black&lt;br/&gt;&lt;strong&gt;/ hposition = 1px * (display.canvaswidth/2) - (values.distance/2) * expressions.ratio_pxpermm &lt;br/&gt;/ vposition = 1px * (display.canvaswidth/2) - (values.distance/2) * expressions.ratio_pxpermm&lt;/strong&gt;&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expressions&amp;gt;&lt;br/&gt;/ fontsize = 1px * values.lettersize * expressions.ratio_pxpermm&lt;br/&gt;&amp;lt;/expressions&amp;gt;&lt;br/&gt;&lt;br/&gt;would be the way to do it.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21334"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Thank you so much - works perfectly!&amp;nbsp;</description><pubDate>Sat, 15 Apr 2017 04:18:40 GMT</pubDate><dc:creator>jm560@sussex.ac.uk</dc:creator></item><item><title>RE: Presenting stimuli of absolute sizes (e.g. in cm)</title><link>https://forums.millisecond.com/Topic21334.aspx</link><description>&lt;div data-id="21333" class="if-quote-wrapper" unselectable="on" data-guid="1492185032093"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21333" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="21333" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="21333" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;&lt;a href="mailto:jm560@sussex.ac.uk"&gt;jm560@sussex.ac.uk&lt;/a&gt; - Friday, April 14, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21333"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="18726" class="if-quote-wrapper" unselectable="on" data-guid="1492185032093"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="18726" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="18726" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="18726" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, March 28, 2016&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-18726"&gt;&lt;div class="if-quote-message-margin"&gt;The approach for position is the same as for size. You'll probably want to take the center of the screen as your anchor and compute the absolute position of the left and right stimulus relative to the center.&lt;br/&gt;&lt;br/&gt;Attached is a modification of the original example from this thread. In addition to the square, a circle is displayed. The distance between the center of the square and the center of the circle is 10cm.&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ squaresize = 50&lt;br/&gt;/ distance = 100&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape square&amp;gt;&lt;br/&gt;/shape = rectangle&lt;br/&gt;/width = 1px * values.squaresize * expressions.ratio_pxpermm &lt;br/&gt;/height = 1px * values.squaresize * expressions.ratio_pxpermm&lt;br/&gt;/color = blue&lt;br/&gt;&lt;strong&gt;/ hposition = 1px * (display.canvaswidth/2) - (values.distance/2) * expressions.ratio_pxpermm&lt;/strong&gt;&lt;br/&gt;/ vposition = 50%&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape circle&amp;gt;&lt;br/&gt;/shape = circle&lt;br/&gt;/width = 1px * values.squaresize * expressions.ratio_pxpermm &lt;br/&gt;/height = 1px * values.squaresize * expressions.ratio_pxpermm&lt;br/&gt;/color = green&lt;br/&gt;&lt;strong&gt;/ hposition = 1px * (display.canvaswidth/2) + (values.distance/2) * expressions.ratio_pxpermm&lt;/strong&gt;&lt;br/&gt;/ vposition = 50%&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="18726"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Hi,&lt;br/&gt;I have been using this very helpful post on calibrating stimuli so that they appear the same size across different screens/resolutions. It works perfectly for my picture stimuli but I can't work out how to do it for my text stimuli. I have letters on a screen that I need to appear at a constant size (1cm). I have posted below what that part of script looks like. At the moment this just seems to change the position. I've tried to put the reszing code where the fontsize is defined and the script will not run. If I set the text size in pt would this be constant across screens?&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/squaresize = 50&lt;br/&gt;/imageheight= 30&lt;br/&gt;/imagewidth = 30&lt;br/&gt;/lettersize = 10&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text Ll1filler&amp;gt;&lt;br/&gt;/ items = ("O")&lt;br/&gt;/ fontstyle = ("Arial Black", 2%, false, false, false, false)&lt;br/&gt;/ txcolor = darkgray&lt;br/&gt;/ select =sequence&lt;br/&gt;/ txbgcolor = black&lt;br/&gt;/ position = (50%, 37%)&lt;br/&gt;/ size = (1px * values.lettersize * expressions.ratio_pxpermm)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;I also want to make the location of the letters constant across screens - I have tried using the same approach as previously asked but it keeps displaying the following error messages,&lt;br/&gt;/2 is not a valid attribute.&lt;br/&gt;Expression '1px*(display.canvaswidth/2' is invalid. Unmatched parenthesis.&lt;br/&gt;&lt;br/&gt;&amp;lt;text Ll1filler&amp;gt;&lt;br/&gt;/ items = ("O")&lt;br/&gt;/ fontstyle = ("Arial Black", 2%, false, false, false, false)&lt;br/&gt;/ txcolor = darkgray&lt;br/&gt;/ select =sequence&lt;br/&gt;/ txbgcolor = black&lt;br/&gt;/ position = (1px * (display.canvaswidth/2) - (values.distance/2) * expressions.ratio_pxpermm, 1px * (display.canvaswidth/2) - (values.distance/2) * expressions.ratio_pxpermm)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;Any help would be appreciated!,&lt;br/&gt;Thanks&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21333"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;&amp;lt;text Ll1filler&amp;gt;&lt;br/&gt;/ items = ("O")&lt;br/&gt;/ fontstyle = ("Arial Black", &lt;strong&gt;expressions.fontsize&lt;/strong&gt;, false, false, false, false)&lt;br/&gt;/ txcolor = darkgray&lt;br/&gt;/ select =sequence&lt;br/&gt;/ txbgcolor = black&lt;br/&gt;&lt;strong&gt;/ hposition = 1px * (display.canvaswidth/2) - (values.distance/2) * expressions.ratio_pxpermm &lt;br/&gt;/ vposition = 1px * (display.canvaswidth/2) - (values.distance/2) * expressions.ratio_pxpermm&lt;/strong&gt;&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expressions&amp;gt;&lt;br/&gt;/ fontsize = 1px * values.lettersize * expressions.ratio_pxpermm&lt;br/&gt;&amp;lt;/expressions&amp;gt;&lt;br/&gt;&lt;br/&gt;would be the way to do it.&lt;br/&gt;</description><pubDate>Fri, 14 Apr 2017 09:01:01 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Presenting stimuli of absolute sizes (e.g. in cm)</title><link>https://forums.millisecond.com/Topic21333.aspx</link><description>&lt;div data-id="18726" class="if-quote-wrapper" unselectable="on" data-guid="1492178267418"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="18726" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="18726" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="18726" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, March 28, 2016&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-18726"&gt;&lt;div class="if-quote-message-margin"&gt;The approach for position is the same as for size. You'll probably want to take the center of the screen as your anchor and compute the absolute position of the left and right stimulus relative to the center.&lt;br/&gt;&lt;br/&gt;Attached is a modification of the original example from this thread. In addition to the square, a circle is displayed. The distance between the center of the square and the center of the circle is 10cm.&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ squaresize = 50&lt;br/&gt;/ distance = 100&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape square&amp;gt;&lt;br/&gt;/shape = rectangle&lt;br/&gt;/width = 1px * values.squaresize * expressions.ratio_pxpermm &lt;br/&gt;/height = 1px * values.squaresize * expressions.ratio_pxpermm&lt;br/&gt;/color = blue&lt;br/&gt;&lt;strong&gt;/ hposition = 1px * (display.canvaswidth/2) - (values.distance/2) * expressions.ratio_pxpermm&lt;/strong&gt;&lt;br/&gt;/ vposition = 50%&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape circle&amp;gt;&lt;br/&gt;/shape = circle&lt;br/&gt;/width = 1px * values.squaresize * expressions.ratio_pxpermm &lt;br/&gt;/height = 1px * values.squaresize * expressions.ratio_pxpermm&lt;br/&gt;/color = green&lt;br/&gt;&lt;strong&gt;/ hposition = 1px * (display.canvaswidth/2) + (values.distance/2) * expressions.ratio_pxpermm&lt;/strong&gt;&lt;br/&gt;/ vposition = 50%&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="18726"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Hi,&lt;br/&gt;I have been using this very helpful post on calibrating stimuli so that they appear the same size across different screens/resolutions. It works perfectly for my picture stimuli but I can't work out how to do it for my text stimuli. I have letters on a screen that I need to appear at a constant size (1cm). I have posted below what that part of script looks like. At the moment this just seems to change the position. I've tried to put the reszing code where the fontsize is defined and the script will not run. If I set the text size in pt would this be constant across screens?&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/squaresize = 50&lt;br/&gt;/imageheight= 30&lt;br/&gt;/imagewidth = 30&lt;br/&gt;/lettersize = 10&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text Ll1filler&amp;gt;&lt;br/&gt;/ items = ("O")&lt;br/&gt;/ fontstyle = ("Arial Black", 2%, false, false, false, false)&lt;br/&gt;/ txcolor = darkgray&lt;br/&gt;/ select =sequence&lt;br/&gt;/ txbgcolor = black&lt;br/&gt;/ position = (50%, 37%)&lt;br/&gt;/ size = (1px * values.lettersize * expressions.ratio_pxpermm)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;I also want to make the location of the letters constant across screens - I have tried using the same approach as previously asked but it keeps displaying the following error messages,&lt;br/&gt;/2 is not a valid attribute.&lt;br/&gt;Expression '1px*(display.canvaswidth/2' is invalid. Unmatched parenthesis.&lt;br/&gt;&lt;br/&gt;&amp;lt;text Ll1filler&amp;gt;&lt;br/&gt;/ items = ("O")&lt;br/&gt;/ fontstyle = ("Arial Black", 2%, false, false, false, false)&lt;br/&gt;/ txcolor = darkgray&lt;br/&gt;/ select =sequence&lt;br/&gt;/ txbgcolor = black&lt;br/&gt;/ position = (1px * (display.canvaswidth/2) - (values.distance/2) * expressions.ratio_pxpermm, 1px * (display.canvaswidth/2) - (values.distance/2) * expressions.ratio_pxpermm)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;Any help would be appreciated!,&lt;br/&gt;Thanks&lt;br/&gt;</description><pubDate>Fri, 14 Apr 2017 06:57:57 GMT</pubDate><dc:creator>jm560@sussex.ac.uk</dc:creator></item><item><title>RE: Presenting stimuli of absolute sizes (e.g. in cm)</title><link>https://forums.millisecond.com/Topic18726.aspx</link><description>The approach for position is the same as for size. You'll probably want to take the center of the screen as your anchor and compute the absolute position of the left and right stimulus relative to the center.&lt;br/&gt;&lt;br/&gt;Attached is a modification of the original example from this thread. In addition to the square, a circle is displayed. The distance between the center of the square and the center of the circle is 10cm.&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ squaresize = 50&lt;br/&gt;/ distance = 100&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape square&amp;gt;&lt;br/&gt;/shape = rectangle&lt;br/&gt;/width = 1px * values.squaresize * expressions.ratio_pxpermm &lt;br/&gt;/height = 1px * values.squaresize * expressions.ratio_pxpermm&lt;br/&gt;/color = blue&lt;br/&gt;&lt;strong&gt;/ hposition = 1px * (display.canvaswidth/2) - (values.distance/2) * expressions.ratio_pxpermm&lt;/strong&gt;&lt;br/&gt;/ vposition = 50%&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape circle&amp;gt;&lt;br/&gt;/shape = circle&lt;br/&gt;/width = 1px * values.squaresize * expressions.ratio_pxpermm &lt;br/&gt;/height = 1px * values.squaresize * expressions.ratio_pxpermm&lt;br/&gt;/color = green&lt;br/&gt;&lt;strong&gt;/ hposition = 1px * (display.canvaswidth/2) + (values.distance/2) * expressions.ratio_pxpermm&lt;/strong&gt;&lt;br/&gt;/ vposition = 50%&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 28 Mar 2016 07:01:03 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Presenting stimuli of absolute sizes (e.g. in cm)</title><link>https://forums.millisecond.com/Topic18723.aspx</link><description>Hi, I found the "AbsoluteSizing" script was extremely helpful. However, I am still struggling to maintain a constant distance (in mm) between two pictures presented simultaneously, across different monitor displays?&lt;br/&gt;&lt;br/&gt;How would I write the script for the /position? &amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Below is the relevant script: (Please note, I modified the "Absolute Sizing script", so it uses a credit card instead of a piece of paper):&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/linelength_px= 250&lt;br/&gt;/imageheight= 119.25&lt;br/&gt;/imagewidth = 100&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expressions&amp;gt;&lt;br/&gt;/ratio_pxpermm = values.linelength_px/85.60&lt;br/&gt;&amp;lt;/expressions&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture nonaffFace1rightgap2&amp;gt;&lt;br/&gt;/items= ("fi_000_tw1.bmp", "fi_000_tw2.bmp", "fi_000_tw3.bmp", "fi_000_tw4.bmp") &lt;br/&gt;/select = noreplace&lt;br/&gt;/position= (80, 50) &lt;br/&gt;/size = (1px * values.imagewidth * expressions.ratio_pxpermm, 1 px * values.imageheight * expressions.ratio_pxpermm)  &lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture affFace1leftgap2&amp;gt;&lt;br/&gt;/items = ("fi_000_tw3.bmp", "fi_000_tw4.bmp", "fi_000_tw5.bmp", "fi_000_tw6.bmp") &lt;br/&gt;/select= picture.nonaffface1rightgap2.currentindex&lt;br/&gt;/position= (20, 50)&lt;br/&gt;/size = (1px * values.imagewidth * expressions.ratio_pxpermm, 1 px * values.imageheight * expressions.ratio_pxpermm)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Thank you so much!&amp;nbsp;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 28 Mar 2016 05:27:03 GMT</pubDate><dc:creator>Reshan</dc:creator></item></channel></rss>