I want the user to be able to write like http://www.google.com in one
textBox and Google in an other textBox.
Than I want the user to press a button when done. The text will then be past
like http://www.google.com,Google in to a file.
I want the user to be able to send as many links with names as they want to
that file. Then I want my program to be able to read from that file as I
start the program from a button at my form and use it in the program.
I am using MS Agent and I want the user to be able to write down links like
i described and then when I start the agent I want the agent to "build"
this:
All the names the user wrote:
Merlin.Commands .RemoveAll
Merlin.Commands .Add "Google", "Google", "Google"
Merlin.Commands .Add "Lunarstorm ", "Lunarstorm ", "Lunarstorm "
Merlin.Commands .Add "Back", "Back", "Back"
Merlin.Commands .Add "Forward", "Forward", "Forward"
Merlin.Commands .Add "Close", "Close", "Close"
The Names and the URL the user wrote down:
Select Case UserInput.Name
Case "Google"
URL= "http://www.google.se"
objInternet.Nav igate Adress
Case "Lunarstorm "
URL= "http://www.lunarstorm. se"
objInternet.Nav igate Adress
Case "Back"
objInternet.Bac k
Case "Forward"
objInternet.For ward
Case "Close"
objInternet.Qui t
End Select
I want to do something like this:
Read the file line by line split the line at the "," and pot the left and
right string in an array and then go to the next line and add that to the
array as well and so on.
Then I want to use it in the MS Agent as this, to be able to use the links:
(As the Link names is the odd numbers I will just write out the odd
numbers.)
for (i=1, i<= aryLength(aryLi nk[i]), i=+2)
{
Merlin.Commands .Add "aryLinks[i]", "aryLinks[i]", "aryLinks[i]"
}
Merlin.Commands .Add "Back", "Back", "Back"
Merlin.Commands .Add "Forward", "Forward", "Forward"
Merlin.Commands .Add "Close", "Close", "Close"
Then here it is a little harder, the Case Is the odd numbers in the Array
and the URL is the even numbers.
Select Case UserInput.Name
Case "Google"
URL= "http://www.google.se"
objInternet.Nav igate URL
Case "Lunarstorm "
URL= "http://www.lunarstorm. se"
objInternet.Nav igate URL
These are not taken from the file:
Case "Back"
objInternet.Bac k
Case "Forward"
objInternet.For ward
Case "Close"
objInternet.Qui t
End Select
As you can see is this not a language that exist... I don't know how to do
it in VB 6 It is not the same as using PHP with mySQL...
I'm a newbe to VB and some other languages as well...So it's all a bit
confusing...
Plz show me in the right direction to get this to work :-)
Comment