adz89 Posted March 30, 2009 Posted March 30, 2009 (edited) Hey all, Now, I've made myself a Tribal Wars bot, however, I want to add some intillegence to the bot. I've got it to click on the build buttons on different buildings, however, I'm stumped with this next bit, I want the bot to read how long is left in the building queue and then sleep for that amount of time. I've been looking at other posts from people that haven't had this problem, but I can't figure out how they read the countdown timer! Any Ideas? EDIT: Typo Edited March 30, 2009 by adz89 Self confessed noob...
SpookMeister Posted March 30, 2009 Posted March 30, 2009 pixelgetcolor [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]
adz89 Posted March 30, 2009 Author Posted March 30, 2009 pixelgetcolorReally?Can I get the countdown time from that? I thought it could only be used for getting the colour of a certain area?How would I use it? Self confessed noob...
SpookMeister Posted March 30, 2009 Posted March 30, 2009 I am not familiar with the game, but I had assumed there was some type of progress bar for the count down. If the readout is numerical, then you "could" do a series of PixelGetColor calls to determine what value is being shown. Perhaps you could post a couple screen shots of what you are looking at, and we could help you work something out. Keep in mind that while Autoit "can" be used for creating game bots, that is not what it was built for, nor is it likely to be the "best" tool for the job. [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]
adz89 Posted March 30, 2009 Author Posted March 30, 2009 (edited) I am not familiar with the game, but I had assumed there was some type of progress bar for the count down. If the readout is numerical, then you "could" do a series of PixelGetColor calls to determine what value is being shown. Perhaps you could post a couple screen shots of what you are looking at, and we could help you work something out. Keep in mind that while Autoit "can" be used for creating game bots, that is not what it was built for, nor is it likely to be the "best" tool for the job. Yeah, well its a numerical countdown, and it also gives you a completed time, (real time) I know its probably not the best, but I don't wanna learn a new language, as It's taken me long enough to learn (sort of) this one. The countdown, is dynamic and keeps going until it gets to zero Screenshot's attached Edited March 30, 2009 by adz89 Self confessed noob...
SpookMeister Posted March 30, 2009 Posted March 30, 2009 That looks like html, have you looked at the _IE functions in the help file? There is a slight learning curve... but it looks to me like you can grab that data directly [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]
adz89 Posted March 30, 2009 Author Posted March 30, 2009 That looks like html, have you looked at the _IE functions in the help file? There is a slight learning curve... but it looks to me like you can grab that data directlyYeah, I've programed the entire bot in pretty much IE functions, but I am truley stumped with this oneI'll have another look through the help file, but if you know of any functions which will help me, don't be afraid to shout out!Thanks for your help so far Self confessed noob...
SpookMeister Posted March 30, 2009 Posted March 30, 2009 Doesn't _IEBodyReadHTML show the data? [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]
adz89 Posted March 30, 2009 Author Posted March 30, 2009 Doesn't _IEBodyReadHTML show the data?...Well I haven't tried that, but wouldn't that just show all the html of the page, and I'm pretty sure that the countdown is in Java...How would I use _IEBodyReadHTML to get the countdown anyway? I'll give it a go and see if it works Self confessed noob...
adz89 Posted March 31, 2009 Author Posted March 31, 2009 Well I haven't tried that, but wouldn't that just show all the html of the page, and I'm pretty sure that the countdown is in Java...How would I use _IEBodyReadHTML to get the countdown anyway? I'll give it a go and see if it worksAny ideas guys?I can't try it unless I know how to get the countdown from it! Self confessed noob...
Triblade Posted March 31, 2009 Posted March 31, 2009 (edited) *edit* misread. was mentioned earlier. sorry. Edited March 31, 2009 by Triblade My active project(s): A-maze-ing generator (generates a maze) My archived project(s): Pong3 (Multi-pinger)
TerarinK Posted March 31, 2009 Posted March 31, 2009 You could setup a function in another application that only time for that application. All you need to do is get the completion time then execute the nearest one, however you should implement key words on if you come up with something that will finish faster cut into the query Query Timer Query Function with just these few things it is possible However if you want to create a script inside of the current script then your also expecting for major delay unless you ruin your script by adlib, something I wouldn't use. but you could implement it in your script with the same results 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E
adz89 Posted March 31, 2009 Author Posted March 31, 2009 You could setup a function in another application that only time for that application. All you need to do is get the completion time then execute the nearest one, however you should implement key words on if you come up with something that will finish faster cut into the queryQueryTimerQuery Functionwith just these few things it is possibleHowever if you want to create a script inside of the current script then your also expecting for major delay unless you ruin your script by adlib, something I wouldn't use. but you could implement it in your script with the same resultsWell I know what I'm going to do with the data I get, but I don't actually know how to get the countdown from the webpage...The script has to wait until the end of the countdown anyway, as the website won't take any input while the countdown is running! Self confessed noob...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now