Jump to content

how to write next line from text


Go to solution Solved by JohnOne,

Recommended Posts

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 .

 

Link to comment
Share on other sites

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

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:

Link to comment
Share on other sites

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

  • Moderators

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:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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