Try running the following in an InLine and see what happens:
Const S2LowHz As String = "C:\destok\stimulos\tones\S2200v2.wav."
MsgBox S2LowHz
When I run this in EP2, I get a message box with the message
C:
and nothing else -- i.e., it does not display the expected
"C:\destok\stimulos\tones\S2200v2.wav."
So what happened? Well, within text strings E-Prime treats the "\"
character as an "escape" character -- see
en.wikipedia.org/wiki/Escape_character for more background on this
concept. So when EP reached "\d" in the string it treated that as an
escape sequence instead of literal "\d". Etc.
How can you work around this? Two approaches:
(1) As explained in the Wikipedia article (which I myself edited to
include this information), escape the "\" with another "\", e.g.,
"C:\\destok\\stimulos\\tones\\S2200v2.wav." Please try this in EP2 and
see what happens!
(2) Use "/" instead of "\" in both your Const and your attribute. It
turns out that E-Prime and Windows will accept a normal forward-slash
for a path separator (which is what the rest of the computing world
uses). Hint: I much prefer this approach. See also
support.pstnet.com/hc/en-us/articles/360017774154-INFO-Use-for-path-separation-for-E-Objects-with-filename-property-16554-
One side note: I notice that your string
"C:\destok\stimulos\tones\S2200v2.wav." ends with a period, I suspect
the final period is a mistake.
Best,
-- David McFarlane
On 2021-05-03 Mon 6:45 AM, Maria Eugenia De Lahoz Naveiro wrote:
> Hii!!
>
> I am design an S1-S2 sound experiment, where S1 always is one type of tones
> but S2 can are two types of tones.
>
> For my version of e-prime, I have to write an in line and the scrip havee
> an *if..then*.
>
> I define a *Const .... As String* to define the two diferent route of the
> two types S2 stimulus. But the *"bloop if..then" fail,* them *msgbox* display