LastSoul Posted August 17, 2013 Share Posted August 17, 2013 hey all i write code to auto login in pppoe from list of text the code is complete but i have problem with write next line from file text to pppoe and go to next line this is the code : #include <file.au3> $file = FileOpen("E:\Users\lord\Desktop\1.txt", 0) $fil2 = FileOpen("E:\Users\lord\Desktop\1.txt", 0) Local $soul =FileReadLine($file) Local $sou2 =FileReadLine($fil2) login() Func login() ControlMove ( "[CLASS:SysListView32; INSTANCE:1]", "", 1, 0, 0 ) Run("control ncpa.cpl") WinWaitActive("Network Connections") Send("{down}") Send("{up}") send("{enter}") WinWaitActive("Connect Broadband Connection") ControlSetText("[CLASS:Edit; INSTANCE:1]", "1104", "Edit1", send($soul)) send("{TAB}") ControlSetText("[CLASS:Edit; INSTANCE:2]", "1104", "Edit2", send($sou2)) send("{enter}") If WinWaitActive("Connecting to Broadband Connection...") Then send("{Esc}") Return login() Else Exit EndIf EndFunc Thanks all . Link to comment Share on other sites More sharing options...
JohnOne Posted August 17, 2013 Share Posted August 17, 2013 Difficult to know your problem but it might be that you do not get what you expect.. ControlSetText("[CLASS:Edit; INSTANCE:1]", "1104", "Edit1", send($soul)) ControlSetText("[CLASS:Edit; INSTANCE:2]", "1104", "Edit2", send($sou2)) ControlSetText("[CLASS:Edit; INSTANCE:1]", "1104", "Edit1", $soul) ControlSetText("[CLASS:Edit; INSTANCE:2]", "1104", "Edit2", $sou2) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
LastSoul Posted August 17, 2013 Author Share Posted August 17, 2013 thanks u johan but this is not the problem i just want every time Return login() its go to next line in the text FileReadLine. Link to comment Share on other sites More sharing options...
JohnOne Posted August 17, 2013 Share Posted August 17, 2013 Since your code runs only once then exits, there is no next line. Perhaps you need to explain more precisely what you want to do. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
LastSoul Posted August 17, 2013 Author Share Posted August 17, 2013 look i need to connect to pppoe from text file that mean getting the user and password from it its try if its wrong it will try agine and if its right will stop the user and password get from text but the problem its not go to next line in text to try anther user and password. Link to comment Share on other sites More sharing options...
Solution JohnOne Posted August 17, 2013 Solution Share Posted August 17, 2013 while 1 $soul =FileReadLine($file) $sou2 =FileReadLine($fil2) login() wend LastSoul 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
LastSoul Posted August 17, 2013 Author Share Posted August 17, 2013 Thanks You JOHN i tried it its write only on character from text anther solution ? Link to comment Share on other sites More sharing options...
JohnOne Posted August 17, 2013 Share Posted August 17, 2013 Difficult to know your problem but it might be that you do not get what you expect.. ControlSetText("[CLASS:Edit; INSTANCE:1]", "1104", "Edit1", send($soul)) ControlSetText("[CLASS:Edit; INSTANCE:2]", "1104", "Edit2", send($sou2)) ControlSetText("[CLASS:Edit; INSTANCE:1]", "1104", "Edit1", $soul) ControlSetText("[CLASS:Edit; INSTANCE:2]", "1104", "Edit2", $sou2) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
LastSoul Posted August 17, 2013 Author Share Posted August 17, 2013 (edited) does autoit not support to go next line in FileReadLine ? Edited August 17, 2013 by LastSoul Link to comment Share on other sites More sharing options...
JohnOne Posted August 17, 2013 Share Posted August 17, 2013 "If no line number to read is given, the "next" line will be read." <- help file. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
LastSoul Posted August 17, 2013 Author Share Posted August 17, 2013 then why wont go read next line in my code ? Link to comment Share on other sites More sharing options...
JohnOne Posted August 17, 2013 Share Posted August 17, 2013 Sorry, You've completely lost me. First you're reading text files and all of a sudden you're banging on about code. Maybe someone else can understand you better than I. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
LastSoul Posted August 18, 2013 Author Share Posted August 18, 2013 i hope that anyway thanks John Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 18, 2013 Moderators Share Posted August 18, 2013 LastSoul,Would you care to explain why you appear to be cycling through a text file of usernames and passwords and trying to login to a network? M23 LastSoul 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
LastSoul Posted August 18, 2013 Author Share Posted August 18, 2013 Does its wrong to do that ? Link to comment Share on other sites More sharing options...
kylomas Posted August 19, 2013 Share Posted August 19, 2013 I see others are reading this thread. Please do not reply till M23 has a satisfactory response. kylomas LastSoul 1 Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
LastSoul Posted August 20, 2013 Author Share Posted August 20, 2013 anyway thanks i complete the work with vb.net by command line with compile the code from vb.net and process to start 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