Register for your free account! | Forgot your password?

Go Back   elitepvpers › Coders Den › AutoIt
You last visited: Today at 08:47

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Auto Login for a website (Tribal wars)

Discussion on Auto Login for a website (Tribal wars) within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2017
Posts: 1
Received Thanks: 0
Auto Login for a website (Tribal wars)

I want to make a bot for tribal wars, the first thing I want to do is an auto login.
The user types his username and password into a GUI and if he is not already logged in, it should type in the information.

My Questions:

1. How can the program put the information in the right fields?

2.If I need the variables that the site uses how can I get them?
IchWillNurBotsSchreiben is offline  
Old   #2
 
rachefaust's Avatar
 
elite*gold: 4
Join Date: Aug 2011
Posts: 157
Received Thanks: 24
read the class of the input field replace the strings example the standart filled (username) replaced the user name (WillNur) same with pw 2. right click on the username inputfield and inspect ...

watch some youtube tuts there are some good explained for a auto-login script
rachefaust is offline  
Old   #3
 
mhaendler's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 1,826
Received Thanks: 226
you can either use "Browser automation" or "WinHTTP"
With Browser automation you can use IE.au3 or FF.au3 WinHTTP is sending Pakets -> WinHTTP.au3

With Web Developer Tools you can figure out how to get to the needed "fields" / name of the fields e.g.
<input type="text" name="username" or stuff like that

or just google autoit auto login script
mhaendler is offline  
Old   #4
 
psydinger's Avatar
 
elite*gold: 0
Join Date: Apr 2017
Posts: 84
Received Thanks: 12
I assume you already have a basic idea of how to create a GUI with AutoIt. There are plenty of tutorials on youtube if that's not the case.

In case you don't want to use any UDFs, AutoIt brings a great set of Internet Explorer functions. All you need to do is make use of them and pass your login variables-interact with the needed elements of the website. AutoIt can perform these tasks in the background.

I would suggest reading through these functions and their parameters thoroughly. They are -in my opinion- the most important ones to get you started!










To know more about any DOM element of the website you are targeting (like a form element in your case for example), just open the site in any browser and right-click -> inspect the element.

This is key for telling AutoIt exactly what it should do, and to understand how the targeted site works.
psydinger is offline  
Old   #5
 
Memphiisto's Avatar
 
elite*gold: 115
Join Date: Feb 2009
Posts: 353
Received Thanks: 44
Hallo!

Hier ein kleines Beispiel: (kleiner Ausschnitt aus einem meiner Codes)

Dieses Login hier ist mit einem "verschlüsseltem" Passwort in einer Ini Datei, damit man es zumindet nicht grad im Klartext lesen kann...
Die interessanten Befehle für dich wären momentan nur die _IE.... Befehle.

PHP Code:
Func _Login()
    
$LBenutzername = IniRead(@WorkingDir & "\Settings\Settings.ini", "Logindata", "Benutzername", "Default")
    
$EncryptedPasswort = IniRead(@WorkingDir & "\Settings\Settings.ini", "Logindata", "Passwort", "Default")
    
$sDecryptedPW = _Crypt_DecryptData($EncryptedPasswort, "VerschlüsselungsPW", $CALG_RC4)
    
$oForm = _IEFormGetObjByName($oIE, "login")
    
$oQueryUsername = _IEFormElementGetObjByName($oForm, "username")
    
$oQueryPassword = _IEFormElementGetObjByName($oForm, "password")
    
_IEFormElementSetValue($oQueryUsername, $LBenutzername)
    
_IEFormElementSetValue($oQueryPassword, BinaryToString($sDecryptedPW))
    
_IEFormSubmit($oForm)
    
_IELoadWait($oIE, 0)
EndFunc   ;==>_Login 

Dafür brauchst du natürlich zuerst ein Objekt und die IE.au3

Lg Memphisto


Edit:
Ups didnt see you wrote in english haha...

Let me rewrite that....:

Hello!
Here you have a short snipplet out of a code of mine (also learned it out of a tutorial somewhere on elitepvpers)

The Code i posted above is a "Loginscript" with an encrypted Password.. the Data is read out of an ini File.. (I only "encrypted" the password so you cant read it this easy out of the Ini File...)

The most intresting Commands for you would be the ones with _IE...


[CODE]

For this you will of course first need an Object and the IE.au3

Greetz Memphisto
Memphiisto is offline  
Old   #6



 
xShizoidx's Avatar
 
elite*gold: 0
The Black Market: 283/0/0
Join Date: Feb 2011
Posts: 1,351
Received Thanks: 410
The input fields of the page have no name. As I see it, you do not have a unique class or ID. It is easiest if you determine the surrounding DIV containers of the input fields and then select the child element.
xShizoidx is offline  
Reply


Similar Threads Similar Threads
[Selling] Tribal Wars Bot - DSOwnage Release | Auto Farming | Perfect Timing | Auto Build
07/07/2015 - Browsergames Trading - 7 Replies
>>> www.dsownage.com <<< Full automated Tribal Wars-Bot. For all server and worlds!
Tribal Wars ?!
05/04/2011 - Browsergames - 3 Replies
Anyone ?? Can u teach my guys, Strats or Tips to be strong in this game ?:)
anyone play tribal wars??
06/20/2008 - General Gaming Discussion - 5 Replies
anyone play tribal wars?



All times are GMT +2. The time now is 08:47.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.