Tally List : mailing list management, archiving, and analysis
click for archive home
 
Archive of:
Authorware
MacroMedia AuthorWare
 
home
24 hour view
quick stats
weekly updates
 
all tallylists
corporate solutions
archive your favorite
help / feedback


Search the Tallylist search by keyword:

About Authorware :
product's home
product's list home
 
  Archived TallyList / Authorware: 
Subject: Re: AW5 - Reading and Setting up External Files
Charles Rholl (103p/+0r)     Posted: Tuesday 17 Apr 2001
This post: 39 views, +0 rating

Amy Jorgensen wrote:

> Hi everyone, > > We are new to Authorware (2 months) and having a lot of trouble getting the > ReadExtFile to work. What we need to do is read a file containing text > data. It is saved in Notepad. The WriteExtFile and AppendExtFile works but > we can't get the Read. > > Scenerio: The student will enter login information. This information needs > to match what is in the Notepad text file and if it matches continue if not > go back to login procedure. I don't know how to set up the notepad file so > that Authorware can read it? What is wrong in the logic of my code? Any > help is greatly appreciated. > > UserData:= ReadExtFile("E:\\StudentFiles" ^"students.txt")

You need to add the delimiter between "...StudentFiles" and "students.txt", e.g.: UserData:= ReadExtFile("E:\\StudentFiles\\students.txt") OR delim :="\\" UserData:= ReadExtFile("E:\\StudentFiles" ^delim ^ "students.txt")

Also, hardcoding the drive letter "E:" may be dangerous. Is the drive ALWAYS going to be "E" or could it be something else? If it could be something else you want to determine the drive letter based on FileLocation or use a KO, WinAPI, or BudAPI to get the drive letter.

> > repeat with X:=1 to LineCount(UserData)

Your repeat loop should be: repeat with X = 1 to LineCount(UserData) --take out the colon( : )

> > > FileLine := GetLine(UserData, X) --gets the data of Students text file > EvalAssign(FileLine) > end repeat > > if FileLine <> Rank ^"\r"& First ^"\r"& Last ^"\r"& CName then > GoTo(IconID@"DeletedIcon") > end if >

You're not going to go anywhere by going to a deleted icon. But I'm not going to lecture you about using GoTo - someone else is sure to do it.

> > Here is what my Notepad file looks like: > > General<tab>Lesley<tab>Holbert<tab>01-01<return> > > Thanks, Amy > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com > > -- > The AWARE List > http://www.e-media.nl/aware/index.html > > Search the Archives > http://www.e-media.nl/aware/search.html > > Netiquette: > - Use descriptive subject fields > - Use subject prefixes (A5 , A5Mac , A5Web , KO , UCD , OT) > > >

-- The AWARE List http://www.e-media.nl/aware/index.html

Search the Archives http://www.e-media.nl/aware/search.html

Netiquette: - Use descriptive subject fields - Use subject prefixes (A5 , A5Mac , A5Web , KO , UCD , OT)


Similar Subject Line Posts (+/- two weeks of this post)
Re: AW5 - Reading and Setting up External Files  18 Apr 2001   (29 v/ +0 r)
Re: AW5 - Reading and Setting up External Files  17 Apr 2001   (21 v/ +0 r)
Re: AW5 - Reading and Setting up External Files  17 Apr 2001   (43 v/ +0 r)
Re: AW5 - Reading and Setting up External Files  17 Apr 2001   (41 v/ +0 r)
Re: AW5 - Reading and Setting up External Files  17 Apr 2001 (this post)   (39 v/ +0 r)
Re: AW5 - Reading and Setting up External Files  17 Apr 2001   (25 v/ +0 r)
Re: AW5 - Reading and Setting up External Files  17 Apr 2001   (28 v/ +0 r)
Re: AW5 - Reading and Setting up External Files  17 Apr 2001   (19 v/ +0 r)
Re: AW5 - Reading and Setting up External Files  17 Apr 2001   (23 v/ +0 r)
AW5 - Reading and Setting up External Files  17 Apr 2001   (18 v/ +0 r)
 

Send a reply to the Authorware list!
click to send a reply! NOTE: Many lists will reject your post unless you have already registered with them. Also - don't forget the right account to send from (for those with multiple emails!)

Feedback: If this post was exceptionally helpful, please help by giving this post a positive review.

 

TallyList : copyright Ububik - 2000