Sign in to follow this  
Followers 0
Dethredic

Solitare Bot

5 posts in this topic

hi

im thinking of making a "spider solitare bot".

to begin its going to do the "one suit"

the easesy way i can think of is just keep pressing "m" (which is the hint) and follow that.

i have run into the problem of moving the mouse to the "highleted cards" without setting a variable for each card position.

this is wat i have, maby u can see wat im trying to do and help me (it doesn't work btw)

Run("C:\WINDOWS\system32\spider.exe")
WinWaitActive("Spider")
Send("{Enter}")
Sleep(500)
WinMove("Spider", 0, 0, 1160, 838)
Sleep(2000)
Send("m")
$1 = PixelSearch(0, 0, 1160, 838 , 0x000000)
Sleep(200)
$2 = PixelSearch(0, 0, 1160, 838 , 0x000000)

MouseMove($1)
MouseDown("left")
Sleep(1000)
MouseMove($2)
MouseUp("left")

help would be appreated


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites



hi

im thinking of making a "spider solitare bot".

to begin its going to do the "one suit"

the easesy way i can think of is just keep pressing "m" (which is the hint) and follow that.

i have run into the problem of moving the mouse to the "highleted cards" without setting a variable for each card position.

this is wat i have, maby u can see wat im trying to do and help me (it doesn't work btw)

help would be appreated

I think it would be much faster and smoother to create an array of valid card positions to test, and then test just a few pixels (or even one if you can get it down to that) at each location for the color of a selected card. A couple dozen small (10x10) pixel searches probably take much less time than an 1160x838 search, but you'd have to test to be sure. If you can get the test down to one pixel in each card location -- then you're only talking a couple dozen PixelGetColor()'s in a loop.

Not that I ever cheat at solitaire... :)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

its not cheating,

if u mean having a set area for eash of the card positions then that would take forever. Cards are at a different spot depending if there face down or up. face down cards take up less space thean face up cards.

if that is wat u mean could u give me an example?


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

i mean like a script example


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

.........


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

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
Sign in to follow this  
Followers 0