Naive question 3 of 3: Find & replace within list object?

David McFarlane mcfarla9 at msu.edu
Fri Nov 8 22:00:25 UTC 2013


By "inherited a script" do you mean inherited an EP1 .es file, an EP2 
.es2 file, or even an older EP1 .ebs file?  "Script" is an ambiguous 
term in this context.  For that matter, I disapprove of the term 
"script" anyway for E-Prime or E-Basic -- E-Basic is merely a 
derivative of Microsoft Visual Basic for Applications (VBA), and 
everyone else refers to VBA as "code" rather than "script", only PST 
refers to their "code" as "script".  But I digress...

If perhance you mean an older EP1 .ebs file, then you are in luck, 
you may open that file in any text editor and edit, find/replace, 
etc. at will.  But of course, if your collegue saddled you with 
nothing more than an old .ebs file, then they have crippled your 
program development in other ways.

If any .es* file, well, then you will not find any useful 
find/replace mechanism.  But I wonder why you need this.  Are you 
just replacing a few values in a few Lists?  How many replacements do 
you have?  Is it really that hard to type a few replacements by 
hand?  If you do have that many, I start to wonder about the design 
of your Structure.

But here's a hint for wholesale editing of Lists:  Copy the List into 
any text editor or Excel, then do all your editing there.  Once done, 
just paste your edited List back to E-Studio.  Still a bit clumsy, 
but should get the job done.  You might even keep your text or Excel 
List files for backup and documentation.

For that matter, I use the same copy/paste technique whenever writing 
extensive inline code.  I just move everything into a professional 
quality text editor, edit there, then copy back to E-Studio.  Works 
*much* better than the mediocre editor provided in E-Studio, and I 
also get a much more portable and manageable file containing the code 
for backup and documentation.

Word of advice, bear in mind that E-Prime is not a programming 
platform meant for professional programmers, it is meant rather for 
casual programmers (i.e., researchers who want to dabble in 
programming, rather that programmers who want to dabble in research), 
and thus lacks amenities that one would expect in a product meant for 
professionals.  That said, it is a very capable product, and I 
think  overall serves those casual programmers well.

-----
David McFarlane
E-Prime training 
online:  http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter:  @EPrimeMaster (https://twitter.com/EPrimeMaster )

/----
Stock reminder:  1) I do not work for PST.  2) PST's trained staff 
take any and all questions at https://support.pstnet.com , and they 
strive to respond to all requests in 24-48 hours, so make full use of 
it.  3) In addition, PST offers several instructional videos on their 
YouTube channel (http://www.youtube.com/user/PSTNET ).  4) If you do 
get an answer from PST staff, please extend the courtesy of posting 
their reply back here for the sake of others.
\----


At 11/8/2013 03:51 PM Friday, Matt Hall wrote:
>Hi, all- I promise, this is my last question of the day. I've 
>inherited a script from another researcher, and I need to change a 
>list attribute. Currently, the "CorrectAnswer" attributes are the 
>digits 1-4, but I need to re-map them to reflect the response keys 
>that we'll be using: z, x, comma, and slash. I assumed this would be 
>a simple matter of doing a text-based find & replace query (e.g. 
>find "1", replace with "z"), but the Find & Replace option is grayed out.
>
>Suggestions? Much obliged.

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/527d5f03.629a320a.5056.2af1SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/groups/opt_out.



More information about the Eprime mailing list