MattyGibbard Posted April 14, 2008 Share Posted April 14, 2008 Hey guys and girlsI'm new here but I've been tinkering with Autoit for almost half a year now. I've got the new beta version so everything should be ok.I'm having a few problems with coding a simple script and I though maybe you lot could help me out. Basically, it is a bot which you load Bebo accounts into and it checks if they are verified. I know how to do the checking, I'm just not sure on how I go about loading them and getting the backbone there.The .txt file that will be loaded is laid out like this:username - passwordusername - passwordusername - passwordHere is my code. I hope you will be able to help me out as much as you can.#include <GUIConstants.au3> #Include <File.au3> #Include <Array.au3> GUICreate("Bebo Verifier - mattygibbard", 300, 300) ;GUISetIcon ("bebo.ico") $loadaccounts = GUICtrlCreateButton ("Load Accounts", 10, 30, 100) $NumberOfAccounts = guictrlcreateinput ( "No Accounts Loaded :-(", 120,30,150) $Verified = guictrlcreateinput ( "verified", 10,100,70) $Checked = guictrlcreateinput ( "checked", 10,130,70) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $loadaccounts $Accounts = FileOpenDialog("Load Accounts", @DesktopDir & "", "Accounts (*.txt)", 1 ) EndSelect WendI would like to get the label that says, 'No accounts loaded' to count how many lines are in the notepad file loaded and display a number in that box. Also I would like to know how I would go about Autoit remembering them usernames and passwords then trying one, then trying another ETCAny help is greatly appreciated.ThanksMatt Gibbard Link to comment Share on other sites More sharing options...
spudw2k Posted April 14, 2008 Share Posted April 14, 2008 Look for _FileCountLines() in the help file. As far as the remeber usernames, do you mean within the session of the process, or remeber next time the process runs? Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
MattyGibbard Posted April 15, 2008 Author Share Posted April 15, 2008 Look for _FileCountLines() in the help file. As far as the remeber usernames, do you mean within the session of the process, or remeber next time the process runs? Thanks! I now have it to count the ammount of lines (accounts) in the loaded file and put the number in the input box. Basically, what I want to achieve is: 1. Load accounts *Done* 2. Click 'Start' 3. It goes to www.bebo.com/SignIn.jsp 4. It sign's in with the first username and password from the file 5. It checks the page for a certain word 6. If the word is not there, then it adds 1 to the verified box and add's the username to a new list (Verified List) 7. Repeats this process with second account all he way to the end 8. Then you can save the accounts into a new txt file that are verified (Without the word) I know this is a big project but I'm wiling to spend time on this and make it as good as possible. Also any help will be credited. Here is my code again with the added functions. If you think you can add anything or start helping me with the above then please leave a comment or an updated code: #include <GUIConstants.au3> #Include <File.au3> #Include <Array.au3> GUICreate("Bebo Verifier - mattygibbard", 300, 300) GUISetIcon ("bebo.ico") $loadaccounts = GUICtrlCreateButton ("Load Accounts", 10, 30, 100) $NumberOfAccounts = guictrlcreateinput ( "No Accounts Loaded :-(", 120,30,150) $Verified = guictrlcreateinput ( "verified", 10,100,70) $Checked = guictrlcreateinput ( "checked", 10,130,70) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $loadaccounts $Accounts = FileOpenDialog("Load Accounts", @DesktopDir & "", "Accounts (*.txt)", 1 ) $CountLines = _FileCountLines($Accounts) GUICtrlSetData($NumberOfAccounts, $CountLines & " accounts loaded") EndSelect Wend Any help would be appreciated Thanks Matt Gibbard Link to comment Share on other sites More sharing options...
MattyGibbard Posted April 15, 2008 Author Share Posted April 15, 2008 (edited) Thanks for your help. I've been messing about with the script and come up with an even better one.expandcollapse popup#include <GUIConstants.au3> #Include <File.au3> #Include <Array.au3> #include <string.au3> #include <IE.au3> #include <Misc.au3> #include <INet.au3> GUICreate("Bebo Verified Checker v0.1", 300, 320) ;GUISetIcon ("bebo.ico") $filemenu = GUICtrlCreateMenu ("&File") $exitmenu = GUICtrlCreateMenuitem ("Exit",$filemenu) $helpmenu = GUICtrlCreateMenu ("Help") $aboutmenu = GUICtrlCreateMenuitem ("About",$helpmenu) $hmenu = GUICtrlCreateMenuitem ("Help",$helpmenu) guictrlcreatelabel ( "Bebo Verified Checker v0.1 - made by mattygibbard", 20, 05) guictrlcreatelabel ( "Info", 50, 115) $loadaccounts = GUICtrlCreateButton ("Load Accounts", 10, 30, 100) $savelist = GUICtrlCreateButton ("Save", 180, 270, 50) $clearlist = GUICtrlCreateButton ("Clear", 240, 270, 50) $NumberOfAccounts = guictrlcreateinput ( "No Accounts Loaded :-(", 120,30,170) $Verified = guictrlcreateinput ( "None Verified", 20,130,80) $Checked = guictrlcreateinput ( "None Checked", 20,160,80) $start = GUICtrlCreateButton ("Start", 10, 60, 100) $AccoutsVerified = GUICtrlCreateInput ( "",120,60,170,205) $Countlines = 0 $line = 1 GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $loadaccounts $Accounts = FileOpenDialog("Load Accounts", @DesktopDir & "", "Accounts (*.txt)", 1 ) $CountLines = _FileCountLines($Accounts) GUICtrlSetData($NumberOfAccounts, $CountLines & " accounts loaded") Case $msg = $start If $Countlines = 0 Then MsgBox(0, "Error", "No Accounts loaded") Else $info = FileReadLine ($Accounts , $line ) $oIE = _IECreate() _IENavigate($oIE, "http://www.bebo.com/SignIn.jsp") EndIf Case $msg = $exitmenu exit Case $msg = $aboutmenu MsgBox ( 0, "About Bebo Verified Checker", "Made by mattygibbard" & @lf & @lf & "www.bebo.com/matty3861") Case $msg = $hmenu MsgBox ( 0, "Help", "Helpfile") Case $msg = $savelist MsgBox ( 0, "Save", "FileWouldBeSaved") Case $msg = $clearlist MsgBox ( 0, "Clear", "FileWouldBeCleared") EndSelect WendCompile that and see what you guys think. What I now need to know is how to get it to read the notepad:username - password username - passwordSo the first username and password gets read and tried on http://www.bebo.com/SignIn.jspThanks again guys Edited April 16, 2008 by mattygibbard Link to comment Share on other sites More sharing options...
GEOSoft Posted April 15, 2008 Share Posted April 15, 2008 What I now need to know is how to get it to read the notepad: username - password username - password So the first username and password gets read and tried on http://www.bebo.com/SignIn.jsp Thanks again guysFirst you should remove the white spaces around the hyphen in that text file so it looks like this username-password Use _FileReadToArray() and then StringSplit() Each Element Global $myArray, $data _FileReadToArray("MyFile.txt", $myArray) For $I = 1 to Ubound($myArray)-1 $Data = StringSplit($myArray[$I], "-") $user = $Data[1] $Pass = $Data[2] Do what you want in here. Next George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
MattyGibbard Posted April 15, 2008 Author Share Posted April 15, 2008 For some reason, I can't seem to add that into my code. How would I go about adding that into this: expandcollapse popup#include <GUIConstants.au3> #Include <File.au3> #Include <Array.au3> #include <string.au3> #include <IE.au3> #include <Misc.au3> #include <INet.au3> GUICreate("Bebo Verified Checker v0.1", 300, 320) GUISetIcon ("bebo.ico") $filemenu = GUICtrlCreateMenu ("&File") $exitmenu = GUICtrlCreateMenuitem ("Exit",$filemenu) $helpmenu = GUICtrlCreateMenu ("Help") $aboutmenu = GUICtrlCreateMenuitem ("About",$helpmenu) $hmenu = GUICtrlCreateMenuitem ("Help",$helpmenu) guictrlcreatelabel ( "Bebo Verified Checker v0.1 - made by mattygibbard", 20, 05) guictrlcreatelabel ( "Info", 50, 115) $loadaccounts = GUICtrlCreateButton ("Load Accounts", 10, 30, 100) $savelist = GUICtrlCreateButton ("Save", 180, 270, 50) $clearlist = GUICtrlCreateButton ("Clear", 240, 270, 50) $NumberOfAccounts = guictrlcreateinput ( "No Accounts Loaded :-(", 120,30,170) $Verified = guictrlcreateinput ( "None Verified", 20,130,80) $Checked = guictrlcreateinput ( "None Checked", 20,160,80) $start = GUICtrlCreateButton ("Start", 10, 60, 100) $AccoutsVerified = GUICtrlCreateInput ( "",120,60,170,205) $Countlines = 0 $line = 1 GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $loadaccounts $Accounts = FileOpenDialog("Load Accounts", @DesktopDir & "", "Accounts (*.txt)", 1 ) $CountLines = _FileCountLines($Accounts) GUICtrlSetData($NumberOfAccounts, $CountLines & " accounts loaded") Case $msg = $start If $Countlines = 0 Then MsgBox(0, "Error", "No Accounts loaded") Else $info = FileReadLine ($Accounts , $line ) $oIE = _IECreate() _IENavigate($oIE, "http://www.bebo.com/SignIn.jsp") EndIf Case $msg = $exitmenu exit Case $msg = $aboutmenu MsgBox ( 0, "About Bebo Verified Checker", "Made by mattygibbard" & @lf & @lf & "www.bebo.com/matty3861") Case $msg = $hmenu MsgBox ( 0, "Help", "Helpfile") Case $msg = $savelist MsgBox ( 0, "Save", "FileWouldBeSaved") Case $msg = $clearlist MsgBox ( 0, "Clear", "FileWouldBeCleared") EndSelect Wend Cheers, Thanks Matt Gibbard Link to comment Share on other sites More sharing options...
MattyGibbard Posted April 16, 2008 Author Share Posted April 16, 2008 (edited) WOW! You are amazing! Everyone who helps out on this post is getting credit on the app.Ok, here is my new script, with both of the above combined. I'm going to try and make it login within the next few hours.Here is my checklist:1. Needs the 'Clear' button to work. I've disabled it so it only shows when accounts are loaded into the tool, but I can't get them to clear. I want the list of accounts cleared and also the number of accounts loaded.2. Needs to log into bebo with the first account, then logout. Logout url is "http://www.bebo.com/SignOut.jsp". Then sign in with the next account and repeat to the end which then gives a message saying 'Complete'.3. Save button needs to be fixed. I've got it to save but it only saves one account. If I load up 10 accounts and click save, then it only saves the last one. I want it to save the whole box as:username - password username - passwordAny help with the above would be appreciated. Number 2 is obviously the most important at this stage but any other help is a step forwards. Ive added the people that have helped into credits. ThanksNew code is:expandcollapse popup#include <GUIConstants.au3> #Include <File.au3> #Include <Array.au3> #include <string.au3> #include <IE.au3> #include <Misc.au3> #include <INet.au3> GUICreate("Bebo Verified Checker v0.1", 300, 320) GUISetIcon ("bebo.ico") $filemenu = GUICtrlCreateMenu ("&File") $exitmenu = GUICtrlCreateMenuitem ("Exit",$filemenu) $helpmenu = GUICtrlCreateMenu ("Help") $creditsmenu = GUICtrlCreateMenuitem ("Credits",$helpmenu) $aboutmenu = GUICtrlCreateMenuitem ("About",$helpmenu) $hmenu = GUICtrlCreateMenuitem ("Help",$helpmenu) guictrlcreatelabel ( "Bebo Verified Checker v0.1 - made by mattygibbard", 20, 05) guictrlcreatelabel ( "Info", 50, 115) $loadaccounts = GUICtrlCreateButton ("Load Accounts", 10, 30, 100) $savelist = GUICtrlCreateButton ("Save", 180, 270, 50) $clearlist = GUICtrlCreateButton ("Clear", 240, 270, 50) $NumberOfAccounts = guictrlcreateinput ( "No Accounts Loaded", 120,30,170) $Verified = guictrlcreateinput ( "None Verified", 20,130,80) $Checked = guictrlcreateinput ( "None Checked", 20,160,80) $start = GUICtrlCreateButton ("Start", 10, 60, 100) $loadedAccounts = GuiCtrlCreateListView("No|Username|Password", 120, 60, 170, 205) $finalcheck = 0 $finalverify = 0 $Countlines = 0 $line = 1 GUICtrlSetState ( $clearlist, $GUI_DISABLE ) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit 0 Case $msg = $loadaccounts $Accounts = FileOpenDialog("Load Accounts", @DesktopDir & "", "Accounts (*.txt)", 1 ) $CountLines = _FileCountLines($Accounts) GUICtrlSetData($NumberOfAccounts, $CountLines & " accounts loaded") GUICtrlSetState ( $clearlist, $GUI_ENABLE ) GUICtrlSetState ( $loadaccounts, $GUI_DISABLE ) Global $myArray, $Data _FileReadToArray($Accounts, $myArray) For $I = 1 to Ubound($myArray)-1 $Data = StringSplit($myArray[$I], "-") $user = $Data[1] $Pass = $Data[2] ;_ArrayDisplay($myArray) GuiCtrlCreateListViewItem($I & "|" & $user & "|" & $Pass, $loadedAccounts) Next Case $msg = $start If $Countlines = 0 Then MsgBox(0, "Error", "No Accounts loaded") Else GUICtrlSetData($Checked, $finalcheck & " Checked") GUICtrlSetData($Verified,$finalverify & " Verified") Global $myArray, $Data _FileReadToArray($Accounts, $myArray) For $I = 1 to Ubound($myArray)-1 $Data = StringSplit($myArray[$I], "-") $user = $Data[1] $Pass = $Data[2] ;_ArrayDisplay($myArray) MsgBox(0,"TestBox","user: " & $user & " and pass: " & $Pass) Next $info = FileReadLine ($Accounts , $line ) $oIE = _IECreate() _IENavigate($oIE, "http://www.bebo.com/SignIn.jsp") EndIf Case $msg = $exitmenu exit Case $msg = $creditsmenu MsgBox ( 0, "Credits", "MattyGibbard" & @lf & "Spudw2k" & @lf & "newbiescripter" & @lf & "GEOsoft" & @lf & @lf & "Thanks for all your help guys") Case $msg = $aboutmenu MsgBox ( 0, "About Bebo Verified Checker", "Made by mattygibbard" & @lf & @lf & "www.bebo.com/matty3861") Case $msg = $hmenu MsgBox ( 0, "Help", "Helpfile") Case $msg = $savelist If $Countlines = 0 Then MsgBox(0, "Error", "No Accounts loaded") Else $savelocation = FileSaveDialog ( "Save Verified Accounts", @DesktopDir, "Text File (*.txt)", 2, ".txt") FileWriteLine ($savelocation, $user);& "-" & $pass) Endif Case $msg = $clearlist MsgBox ( 0, "Clear", "FileWouldBeCleared") GUICtrlSetState ( $loadaccounts, $GUI_Enable ) GUICtrlSetState ( $clearlist, $GUI_Disable ) EndSelect WendCheersMatt Gibbard Edited April 16, 2008 by mattygibbard Link to comment Share on other sites More sharing options...
MattyGibbard Posted April 16, 2008 Author Share Posted April 16, 2008 I'll expain what I wanted. I wanted the accounts to be loaded, displayed in that box. That is done. Then I wanted the bot to run. The run would login using the 1st account and check the page for a certain word. If the account had that word, it would stay in that box, if not, it would be removed. It will repeat this process up till the last account. Then at the end, only the good accounts will be in the box which can then be saved out. If thats not possible, is there any other way I can check on accounts for a word and see what accounts have it and dont? Link to comment Share on other sites More sharing options...
MattyGibbard Posted April 16, 2008 Author Share Posted April 16, 2008 Nope, your wrong. I'm checking if an account is verified or not. I already know the passwords for the accounts. This is no way a hack at all. It's just to save time. Link to comment Share on other sites More sharing options...
GEOSoft Posted April 16, 2008 Share Posted April 16, 2008 A couple of things here; Since I can't tell if you have removed those spaces that I mentioned earlier then change $Data = StringSplit($myArray[$I], "-") $user = $Data[1] $Pass = $Data[2] To $Data = StringSplit($myArray[$I], "-") $user = StringStripWS($Data[1], 3) $Pass = StringStripWS($Data[2], 3) Now when you get to the page I think you want to discard any where the word exists. Is that correct? If it is then what is your code to check if the word exists or not? George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now