Jump to content

Is It Possible To ... (more)


zugu
 Share

Recommended Posts

... do this:

This topic is about a problem of mine I need to solve. I don't know if AutoIt can help me in this, so that's why I'm posting my problem here. If it is possible to solve this by using AutoIt, then I will surely buy it.

There is a webpage, somewhere. Inside this page there is a rectangular object, in the middle. This object contains six numbers (they're actually six zeroes), like this:

^^ ^^ ^^

0 0 0 0 0 0

It is actually a code that needs to be broken (nothing illegal, it's a game). As you can see, the code is composed of six numbers, each number between 0-9, so that there are 1 000 000 possibilities. Of course, I could just click on the arrow above each number to increment it by 1, but that could take me ages to find the code. What I need is an automated script/program that clicks 10 times on the last number, and then one time on the number on the left, and so on, so that my results would look like this:

000001

000002

000003

******

005896

005897

005898

******

099999

100000

100001

******

999998

999999

In this way I would have tried all the possible combinations. So basically, I just need a script to order my mouse a fairly complex clicking sequence. That is what I want AutoIt to do.

Can AutoIt do this for me?

Thank you.

Link to comment
Share on other sites

for $a = 1 to 10 step 1
for $b = 1 to 10 step 1
for $c = 1 to 10 step 1
for $d = 1 to 10 step 1
for $e = 1 to 10 step 1
for $f = 1 to 10 step 1
mouseclick ("left", 1st button x, 1st button y, 1)
;do whatever else
next
mouseclick ("left", 2nd button x, 2nd button y, 1)
next
mouseclick ("left", 3rd button x, 3rd button y, 1)
next
mouseclick ("left", 4th button x, 4th button y, 1)
next
mouseclick ("left", 5th button x, 5th button y, 1)
next
mouseclick ("left", 6th button x, 6th button y, 1)
next

this should do the job

good luck

Link to comment
Share on other sites

yes if the buttons have a control-id

just hide the window and use controlclick ("windowtitle", "", control-id, "left", 1) instead of mouseclick(...)

if there are no controlids (like in ie - most parts) i think someone made a udf that can achieve your goal with the clicking

Link to comment
Share on other sites

yes if the buttons have a control-id

just hide the window and use controlclick ("windowtitle", "", control-id, "left", 1) instead of mouseclick(...)

if there are no controlids (like in ie - most parts) i think someone made a udf that can achieve your goal with the clicking

since you say it's a web page, controlclick()'s will probably not do the trick. a solution would have to be based on the specific page. if it's a straight html page, get ie.au3, and use the form interaction functions. if it's in java, there are other ways, if it's flash then there is yet another way to interact. the easiest way to get precise help is to give as much info as you can. In this case you should just provide the url.
Link to comment
Share on other sites

  • Moderators

nevermind, I broke the code :)

Generally, we post the solution we used, when we ask for help... if we didn't use one of the solutions provided for us.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...