Jump to content
Sign in to follow this  
LastSoul

how to write next line from text

Recommended Posts

LastSoul

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 .

 

Share this post


Link to post
Share on other sites
JohnOne

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.

Share this post


Link to post
Share on other sites
LastSoul

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.

:sweating: 

Share this post


Link to post
Share on other sites
LastSoul

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:

Share this post


Link to post
Share on other sites
LastSoul

Thanks You JOHN 

i tried it 

its write only on character from text

anther solution ?

 

:sweating:

Share this post


Link to post
Share on other sites
JohnOne

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.

Share this post


Link to post
Share on other sites
LastSoul

does autoit not support to go next line in FileReadLine ?

Edited by LastSoul

Share this post


Link to post
Share on other sites
LastSoul

then why wont go read next line in my code ?  :ermm:

Share this post


Link to post
Share on other sites
LastSoul

i hope that  :sweating: 

anyway thanks John 

Share this post


Link to post
Share on other sites
Melba23

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

  • Like 1

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
LastSoul

Does its wrong to do that ? :shifty:

Share this post


Link to post
Share on other sites
kylomas

I see others are reading this thread.  Please do not reply till M23 has a satisfactory response.

 

kylomas

  • Like 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

Share this post


Link to post
Share on other sites
LastSoul

anyway thanks i complete the work with vb.net 

by command line with compile the code from vb.net and process to start  :thumbsup:

Share this post


Link to post
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
Sign in to follow this  

×