Fruchtwein
-
Content Count
4 -
Joined
-
Last visited
Posts posted by Fruchtwein
-
-
i edit code. try copy new.
Sorry, still the same. If I cick continue it shows up the alerts in correct order as it is put into the CSV file.
(Edit) Also I figured out sometimes the same country is multiple times in the CSV, than it doesn't recognize it. (/Edit)
-
Ciao pash,
thanks for your (fast!) help.
I now get an error message: "You have exceeded the range of the list."
-
Hi,
I work now many hours on this, but couldn't figure out the correct solution.Maybe someone could help me please?
I want my bot to read out CSV file and receive email, password and country from it. So far that works and I have three lists in the end with the correct data.
Now I want to start a loop, where the bot checks the country list and do different things depending on the entry at this certain position.
In my code example he should go to the Amazon country webpage and put in the correct login data, than close the browser and check the next item in the list for the country and so on.
I hope you get, what I want to do
My code to load and read out the CSV file:
create table from file("C:\\Users\\Martin\\Desktop\\Login.csv",&mytable) set(#counterLogin,0,"Global") loop($table total rows(&mytable)) { add item to list(%Login,$table cell(&mytable,#counterLogin,0),"Don\'t Delete","Global") increment(#counterLogin) } remove from list(%Login,0) create table from file("C:\\Users\\Martin\\Desktop\\Login.csv",&mytable) set(#counterPW,0,"Global") loop($table total rows(&mytable)) { add item to list(%Pass,$table cell(&mytable,#counterPW,1),"Don\'t Delete","Global") increment(#counterPW) } remove from list(%Pass,0) create table from file("C:\\Users\\Martin\\Desktop\\Login.csv",&mytable) set(#counterLand,0,"Global") loop($table total rows(&mytable)) { add item to list(%Land,$table cell(&mytable,#counterLand,2),"Don\'t Delete","Global") increment(#counterLand) } remove from list(%Land,0)
My loop code (and I think here is the mistake):
set list position(%Login,0) set list position(%PW,0) set list position(%Land,0) loop($list total(%Login)) { if($comparison($next list item(%Land),"= Equals","DE")) { then { plugin command("ExBrowser.dll", "ExBrowser CleanUp") plugin command("ExBrowser.dll", "ExBrowser Launcher", "Chrome", "", "") login DEU() wait for browser event("DOM Ready","") plugin command("ExBrowser.dll", "ExBrowser Close") } else { } } if($comparison($next list item(%Land),"= Equals","UK")) { then { plugin command("ExBrowser.dll", "ExBrowser CleanUp") plugin command("ExBrowser.dll", "ExBrowser Launcher", "Chrome", "", "") login UK() wait for browser event("DOM Ready","") plugin command("ExBrowser.dll", "ExBrowser Close") } else { } } if($comparison($next list item(%Land),"= Equals","ES")) { then { alert("ES!") } else { } } if($comparison($next list item(%Land),"= Equals","FR")) { then { alert("FR!") } else { } } if($comparison($next list item(%Land),"= Equals","IT")) { then { alert("IT!") } else { } } }
At the moment I only get an error message. If I put in the data in the CSV in the order as I put the code it works out, but than there is no real checking for the country column in the CSV?
Thank you very much!
Fruchtwein
Problem With Combination Of Loop And If And Comparison
in Scripting
Posted
Thanks again.
Now the first message appears and when I press ok for that "alert" the same problem pops up.
I put
into your code, to check if he uses the right data from CSV file and for the first one he did, than the #PW comes out empty (in my CSV, it is always the same - but won't be in general).
I don't have to use ExBrowser, I feel more comfortable with it, but for the testing reason we can use the standard ubot browser.
Thanks so much for time and help!