Jump to content

how to write next line from text


Go to solution Solved by JohnOne,

Recommended Posts

Posted

hey all  :bye: 
 
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 .

 

Posted

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.

Posted

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.

 

:sweating:

Posted
  On 8/17/2013 at 9:04 PM, JohnOne said:

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.

  • Moderators
Posted

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? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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:

  Reveal hidden contents

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...