Sign in to follow this  
Followers 0
A_Noobie_User

Reading data from an ".ini" file

4 posts in this topic

Hello to all.

Ok, I got a question. Lets say I am making a script that will open a web browser, and log me into Yahoo mail. Now lets say i have mulitple Yahoo accounts.

I need a way to take "data" from an .ini file, and have autoit3 input it (becuase i have multiple yahoo acounts, would be easier to make one program that reads form an ini file).

I can make the script that opens the broweser, and pulls up the right webpage. I can also "read" the correct info from an .ini file. Now the problem I have is this; How the heck do you take the "data" that autoit3 "reads", and output it in the borwser?

I have spent some time trying to learn how to do this. I have read the help files, and looked on the 'net.

An example of what im trying to do.

$var = IniRead("d:\Temp1\myfile.ini", "path", "filepath", "NotFound") <- read ini

MsgBox(4096, "Result", $var) <-- msgbox cofnfirms that it read ini right

Send($var, 1) <- is this how you "output" the data in the login box within the web browser?

I hope this question makes sense to some one here.

While I'm here, I got another question. Is there a way to have autoit "prompt" you to look for a directory conataining "the" ini file?

Well thanx a lot for your help.

A_Noobie_User

Share this post


Link to post
Share on other sites



Hello to all.

Ok, I got a question. Lets say I am making a script that will open a web browser, and log me into Yahoo mail. Now lets say i have mulitple Yahoo accounts.

I need a way to take "data" from an .ini file, and have autoit3 input it (becuase i have multiple yahoo acounts, would be easier to make one program that reads form an ini file).

I can make the script that opens the broweser, and pulls up the right webpage. I can also "read" the correct info from an .ini file. Now the problem I have is this; How the heck do you take the "data" that autoit3 "reads", and output it in the borwser?

I have spent some time trying to learn how to do this. I have read the help files, and looked on the 'net.

An example of what im trying to do.

$var = IniRead("d:\Temp1\myfile.ini", "path", "filepath", "NotFound") <- read ini

MsgBox(4096, "Result", $var) <-- msgbox cofnfirms that it read ini right

Send($var, 1) <- is this how you "output" the data in the login box within the web browser?

I hope this question makes sense to some one here.

<{POST_SNAPBACK}>

You will also have to do all keystrokes you normally would have to do manually like TABs to get to the correct input field first.

While I'm here, I got another question. Is there a way to have autoit "prompt" you to look for a directory conataining "the" ini file?

<{POST_SNAPBACK}>

Check out FileOpenDialog() in the helpfile... :)

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

In yahoo, once you go to mail.yahoo.com the cursor is already in the Username field. Just do a Send() command and send the username, Send() tab, then Send() the password, then lastly, Send() enter.

Share this post


Link to post
Share on other sites

As JdeB said, use file open dialog for the prompting of the .ini file. For sending the information you have

$var = IniRead("d:\Temp1\myfile.ini", "path", "filepath", "NotFound")

When you want it to send just do

Send($var)

You should be able to figure this out by yourself. Whenever you look at things from the help file, make sure to look at everything Return Values, Remarks, Examples, etc.


My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0