Reading data from a file

Hello,

Running Eggplant Purple here.

Can someone tell me where I am going wrong.

Consider this, in code if I do:
put (Uname:"user",Pwd:"password") into UsrDtls
put UsrDtls.Pwd
put UsrDtls.Uname

The script runs fine, in the debugger I see the correct values for UsrDtls.Pwd and UsrDtls.Uname.

Rather than have that information in the script though I want to read it from a file.

So in /Users/myuser/Documents/sometext.txt I have a line like this:

(Uname:"user",Pwd:"password")

My script is now like this:
put file "/Users/myuser/Documents/sometext.txt" into UsrDtls
put UsrDtls.Pwd
put UsrDtls.Uname

When I run it I get the following error:

Selection Failed 0:00:00 STUnknownMessage ERROR: No Such Function:'pwd'

What am I doing wrong?

Comments

Sign In or Register to comment.