Re: question re: user account creation script

Tech-Archive recommends: Speed Up your PC by fixing your registry




"Jeremy Schubert" <jschubert@no*spam.shaw.ca> wrote in message
news:%23Q5OFaLPHHA.324@xxxxxxxxxxxxxxxxxxxxxxx
I am almost finished creating a user creation script for a school.
It reads data from a csv file to create all the attributes etc.

1. Is the following line acceptable:
objUser,Put "Display Name" strFirst & " " & strLast

Syntactically wrong: comma should be a period, and the two string
expressions ("display name") and (srfirst & " " & strlast) need something
else between them, likely a comma.

2. The user is instructd to first create a spread *** with appropriate
colums and then convert that to a csv file and then a txt file. The
instructions also say to strip any characters other then alphabetical
characters (e.g. hyphen, comma, and space) from the names. Would it be
easy
to add lines to my script that double check that this has been done and to
remove them if they haven't been. (If removing is a lot of work, I can
cancel the creation of that particular user account and write a note to
the
log file.). Would I basically use something like:

If instrFirst(",") or if instrFirst("-") or if instrFrist(" ")
Then (write log file entry and move on to next user)
EndIf
If instrLast(",") or if instrLast("-") or if instrLast(" ")
Then (write log file entry and move on to next user)
Else (continue on with script)

Depends on how much work you want to force onto the user, and whether or not
simply stripping the characters you do not want will result in acceptable
attribute values, but you could do this either with a number of replace
commands (simple but repetitive and moderately inefficient), or with regular
expressions (a bit more involved).

/Al


.


Quantcast