Sign in to follow this  
Followers 0
Turdsammiches

Need some help

15 posts in this topic

is it possible to make a script that logs in from a list of email's and passwords from a .ini file or .txt file? i've been trying to find out how all day....but alas, no solution....

Share this post


Link to post
Share on other sites



to put this in better words, can i send simulated keystrokes from a .ini or .txt file

Share this post


Link to post
Share on other sites

Yes it is possible.

:D

how?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

$destination = "C:\Program Files\Scorpion2.jpg"

Splashimageon("",$destination,450,338)
Sleep(3500)
SplashOff()

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("test")
GUISetIcon("C:\Users\poop\Desktop\newicon.ico")
GUISetCursor (3)
GUISetBkColor(0x000000)
$Button1 = GUICtrlCreateButton("EXIT", 12, 70, 105, 33, $WS_GROUP)
GUICtrlSetFont(-1, 12, 800, 4, "Franklin Gothic Medium")
GUICtrlSetBkColor(-1, 0x00FF00)
GUICtrlSetCursor (-1, 0)
$Button2 = GUICtrlCreateButton("START", 12, 105, 105, 33, $WS_GROUP)
GUICtrlSetFont(-1, 12, 800, 4, "Franklin Gothic Medium")
GUICtrlSetBkColor(-1, 0x00FF00)
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW)
$Input1 = GUICtrlCreateInput("Email", 8, 24, 105, 21)
$Input2 = GUICtrlCreateInput("Pass", 8, 48, 73, 21)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button2
            Guictrlread ($input1)
            MouseClick("left",588,8,1,0)
            MouseClick("left",599,231,1,0)
            send($Input1)
            MouseClick("left",769,230,1,0)
            GUICtrlRead ($input2)
            send($Input2)
            mouseclick("left",917,233,1,0)
    EndSwitch
WEnd

i had originally wanted to start with an input form for password and email, but i realized i wanted to go from that to having the program read from .ini or .txt for email and password because that way you could have more accounts and not have to make a huge gui or have to type your email and password over and over again when you restart the program because it would be stored in the .ini or .txt.

Edited by Jos
put script ion code box

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

You will have to save the result of Guictrlread($input1) into a variable and use that variable in the Send() command.

- or use Send(Guictrlread($input1)).

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

that works for the input form but how for .ini or .txt

Share this post


Link to post
Share on other sites

that works for the input form but how for .ini or .txt

IniRead() for Ini files.

FileRead() for txt files.

- or I missing something here?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

IniRead() for Ini files.

FileRead() for txt files.

- or I missing something here?

ok, that will read the file, but now how do you send keys based on what it has read from the file

Share this post


Link to post
Share on other sites

could i do it like this

send(iniread "inifilename.ini"))

or

send(fileread "txtfilename.txt"))

Share this post


Link to post
Share on other sites

could i do it like this

send(iniread "inifilename.ini"))

or

send(fileread "txtfilename.txt"))

Yes, given the syntax is code correctly.

Now tell me: Why are you asking and not trying?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Yes, given the syntax is code correctly.

Now tell me: Why are you asking and not trying?

lol i am trying as i ask, but with the last thing i did i got this error:

send(FileRead (email1.txt))

send(FileRead (email1^ERROR

Error: missing separator character after keyword.

how do i fix?

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

lol i am trying as i ask, but with the last thing i did i got this error:

send(FileRead (email1.txt))

send(FileRead (email1^ERROR

Error: missing separator character after keyword.

how do i fix?

As I said: Given the syntax is correct. :D

The filename is a string thus needs to be enclosed in ""

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

As I said: Given the syntax is correct. :D

The filename is a string thus needs to be enclosed in ""

Jos

LOL, i just figured that out a minute before you posted, sorry for being an idiot, and thanks for the help :huggles:

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  
Followers 0