Jump to content
EvandroAguiar

login send data in koda and autoit

Recommended Posts

I need help from you guys, I made a login system, designed in koda, and made a programming in autoit, however I can not in any way to send the input data to the site in the fields and enter the webmail .... help me !!!!

#include <GUIConstants.au3>
 
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 211, 143, 659, 618)
$username = GUICtrlCreateInput("", 64, 24, 129, 21)
$pass = GUICtrlCreateInput("", 64, 56, 129, 21)
$Label1 = GUICtrlCreateLabel("login", 16, 24, 33, 17)
$Label2 = GUICtrlCreateLabel("senha", 16, 56, 33, 17)
$button = GUICtrlCreateButton("Button1", 64, 96, 81, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
 
 
 
 
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $button
                ControlFocus($Form1,"","Edit2")
                  Send("Login no Webmail","user","",$username)
                  Send("Login no Webmail","user","","{TAB}")
                  Send("Login no Webmail","pass","",$pass)
                  Send("Login no Webmail","login_submit","","{ENTER}")
 
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites

You might have a very old help file, or one from the future.

In mine AutoIt 3.3.12.0 Send only takes 2 parameters, not 4.

Also you need to use GuiCtrlRead on $username and $pass controls.

Share this post


Link to post
Share on other sites

i tried so in other arquive

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 433, 409, 678, 294)
GUISetBkColor(0xFFFFFF)
$login = GUICtrlCreateButton("acessar", 296, 312, 105, 33, $WS_GROUP)
GUICtrlSetFont(-1, 8, 400, 0, "Humnst777 BT")
GUICtrlSetBkColor(-1, 0xA6CAF0)
$user = GUICtrlCreateInput("", 24, 198, 377, 23)
GUICtrlSetFont(-1, 9, 400, 2, "Futura Md BT")
GUICtrlSetCursor (-1, 0)
$pass = GUICtrlCreateInput("",24, 256, 377, 23)
GUICtrlSetFont(-1, 9, 400, 2, "Futura Md BT")
$Pic1 = GUICtrlCreatePic("D:sites 44mail.jpg", 40, 8, 345, 145, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Label1 = GUICtrlCreateLabel("Login", 24, 176, 33, 19)
GUICtrlSetFont(-1, 9, 400, 0, "Futura Bk BT")
$Label2 = GUICtrlCreateLabel("Senha", 24, 232, 37, 19)
GUICtrlSetFont(-1, 9, 400, 0, "Futura Bk BT")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
 
While 1
Sleep(100)
 
WEnd
Call('login')
 
Func login ()
 
GUICtrlSetData ($user)
GUICtrlSetData ($pass)
 
EndFunc

Share this post


Link to post
Share on other sites

solved ..... but this line $ Pic1 = GUICtrlCreatePic ("D: sites 4 4 mail.jpg", 40, 8, 345, 145, BITOR ($ SS_NOTIFY, $ WS_GROUP, $ WS_CLIPSIBLINGS)) can not store the image, tested it on my note worked, however no figure

Edited by EvandroAguiar

Share this post


Link to post
Share on other sites

Plz use the blue code autoit button to post code that will make it more readable.

like that :

While 1

                  Send("Login no Webmail")
                  Send("user")
                  Send("$username")
 
WEnd

This is correct syntax for your send commands . :/

 

and this cant be correct...

"D: sites 4 4 mail.jpg"

you are oblige to get somthing like that at least...

"D: sites 4 4 mail.jpg"

and probably like this...

"D:sites 44mail.jpg"

Edited by caramen

My video tutorials : HERE ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

@EvandroAguiar

Boas, não consegues preencher a form pelo send() que browser usas? existe um UDF para o chrome, outro para o Firefox e outro para o IE

Explica o que pretendes fazer, automaçao do login apenas? ou obter dados da pagina e mostrar no teu programa?

cumps


Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

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

×
×
  • Create New...