Sign in to follow this  
Followers 0
Dederich

Noob Question and apology

5 posts in this topic

#1 ·  Posted (edited)

Hey all,

I am new to coding and just downloaded AutoIt yesterday. What I am trying to do is create a bot that will load a website and log me in, that will work with any default browser. Since this is for an online game that considers this cheating I am doing it any way as a test of what I have learned using a throw away account. I have checked the help files and the forum, but either I don't understand what I have read or can't find what I need. I am posting my current code (always a work in progress). What I need is a way to enter the username and password, and a way to select an option from a drop down menu. If you are wondering what browser I use it is normally Firefox but once in a while I use Internet Explorer, and I want it to work with both. Thanks and I apologize if this has been asked and answered before but I could not find it.

;  Loads site login page in web browser.
ShellExecute("http://site/user/login")
Sleep(5000); Clicks login button. This assumes that your Username and Password are saved and automatically entered into proper places.
MouseClick("left", 712, 624, 1, 1)
Sleep(5000);  clicks city button.
MouseClick("left", 256, 475, 1, 1)
Sleep(5000);  Moves page down for easy access to city picture.
MouseWheel("down", 2)
Sleep(2000); Clicks graveyard icon in city picture.
MouseClick("left", 945, 605, 1, 1)
Sleep(5000)
; clicks go button in graveyard.
MouseClick("left", 801, 614, 1, 1)
Sleep(5000)
;  Moves page down for access to leave game. Then clicks leave game.
MouseWheel("down", 4)
Sleep(5000)
MouseClick("left", 252, 617)
Edited by Dederich

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

(IMO)Logging into a website is not considered cheating.I am thinking that your site has a logout timer or something? Anyways, I believe the coordinates for the input boxes in IE and Firefox would be different than one another.

Edited by dgarrett8

"I think, therefore I am"[size="1"]René Descartes[/size]

Share this post


Link to post
Share on other sites

(IMO)Logging into a website is not considered cheating.I am thinking that your site has a logout timer or something? Anyways, I believe the coordinates for the input boxes in IE and Firefox would be different than one another.

First, to answer wakillon's reply, yes about ten minutes after I posted.

It's not the logging in that is the cheat. It's the work that it will do, thus the choosing from a drop down menu. I also believe that you are correct when you say the coordinates are different for the input boxes. What I want to know is how to find them in both browsers and enter the data using one program. So that I don't have to keep passwords in multiple places, and limiting disk usage. I have no problem leaving out the ability to have the bot do the selecting of the work time and clicking go. Thus eliminating the cheat part of the bot, but I really want to know if there is a way to find the login inputs for both browsers automatically.

Share this post


Link to post
Share on other sites

WELCOME!

;)

Share this post


Link to post
Share on other sites

I suggest you read the announcement.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0