Source language: Translate to:

Couple of questions

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Couple of questions

Postby nlantz » Mon Dec 14, 2009 1:34 pm

Hello, I am currently developing a program that lets you input login's and passwords for a website that get stored into a file login.dat
I have it set up so where you enter your info into 2 fields "username" and "password"
the code is as follows
Code: Select all
FileRead "[PubDir]login.dat" "All" "[loginfile]"
FileWrite "login.dat" "Append" "[user]:[pass]"

This should write to the file login.dat the entered username and password and save it as username:password into that file. It fails to do this task shows in debug everything is working yet checking the file in notebook shows nothing has happend.

The second part of this program is where i have not much of a clue how to get to work, I would like it to read a line in the login.dat file, set the line as a var and split the username:password data into 2 vars that can be sent to the login parts of the webpage
as far as I can see i should use StrParse but I am not sure how it works with diffrent lengths in usernames and passwords and removal of the :

anyone know alot more then me ? seems like it should be simple
Posts: 2
Joined: Sat Mar 28, 2009 8:08 pm

Postby Wrangler » Mon Dec 14, 2009 2:01 pm

Make sure the variables [user] and [pass] contain data. The textentry boxes you use should have these variables entered into the variable box in the textentry properties.

For the rest of the program, the help file is your best friend. If you run into trouble, post the code you are trying here so we can look at it.
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
User avatar
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby nlantz » Mon Dec 14, 2009 2:34 pm

yea I kinda figured it out,
Just going to have people manualy edit the .dat file
little more reading and i figured out StrParse
Posts: 2
Joined: Sat Mar 28, 2009 8:08 pm

Postby Neosoft Support » Mon Dec 14, 2009 2:45 pm

Make sure that you include the [PubDir] prefix whenever you write to the dat file. (You neglected to do this for the second action.) For example:

FileRead "[PubDir]login.dat" "All" "[loginfile]"
FileWrite "[PubDir]login.dat" "Append" "[user]:[pass]"
NeoSoft Support
Neosoft Support
NeoSoft Team
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests