I am a newbie with LR 7.5 scripting and would appreciate an early help for the following scenario:

1. Create a login script for a scenario wherein a "userid" is asked. Next, on the "Step 2" of login process the user is asked to enter "PIN" and "Password".

2. "PIN" and "Password" are of 6-16 characters in length.

3. The user will be always prompted to enter the first 3 characters of "PIN" and "Password".

My questions are:
1. Does LR have any inbuilt function wherein I can break the "PIN" string and take the first 3 characters one by one ?
I tried to go through the function reference but I could not get much out of it.

2. Can I have a "login" separate script and just call it into some other scripts ? If yes, then how is it incorporated ?

Awaiting an early help from LR Gurus sitting out there.

Thanking you in anticipation,