AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AHK pokerstars Help!

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
lnmax



Joined: 26 Feb 2010
Posts: 4

PostPosted: Fri Feb 26, 2010 8:06 pm    Post subject: AHK pokerstars Help! Reply with quote

Good afternoon!
Somebody can help me.
In PokerStars At registration in tournament the window "Tournament Registration" opens.
Help as means AUTOHOTKEY to intercept the text an example: "Buy-in: $2 + $0.20 Entry free"? Through WinSpy an ego not probably to read.
It is necessary for my program.
I will throw off a few money to that who will help!
Back to top
View user's profile Send private message
Fatal_Error



Joined: 24 Jul 2009
Posts: 13

PostPosted: Fri Feb 26, 2010 11:18 pm    Post subject: Reply with quote

If the text of your game is in a photo format, it can be "intercepted" by taking a screenshot of said text, cropping text to an imagefile.bmp, and then using ImageSearch to locate said text. Downside to this method is you would have to take a screenshot for every possibly combination of text displayed in this fashion and write a bit of code for it.

For example, you can take a creenshot of "Buy-in: $2 + 40.20 Entry free" crop it, and place the image file with your script file in the same folder. ahk code as follows:

Code:
Loop
{
   ImageSearch,,, x1, y1, x2, y2, *10, %A_ScriptDir%\ImageFile.BMP ;replace x1, y1, x2, y2 with the screen coordinates to search for your image.
   IF(ErrorLevel=0)
   {
      ;Insert your autohotkey actions in here.
   }
}


Probably a very bad way of doing this but it works.
Back to top
View user's profile Send private message
jl34567



Joined: 03 Jan 2010
Posts: 262

PostPosted: Fri Feb 26, 2010 11:31 pm    Post subject: Reply with quote

Check the 2+2 forum.....if they can't help......send me a message.
Back to top
View user's profile Send private message AIM Address
lnmax



Joined: 26 Feb 2010
Posts: 4

PostPosted: Sat Feb 27, 2010 5:00 am    Post subject: Reply with quote

Thank you very much!

I wrote the following code:
Code:

CoordMode Pixel, Relative
Loop {
WinWait, Tournament Registration
WinActivate
WinSet, Transparent, off
ImageSearch, FoundX, FoundY, 0, 0, 380, 330, buyin.bmp
if ErrorLevel = 2
    {
    MsgBox Could not conduct the search.
    }
else if ErrorLevel = 1
    {
    WinClose
    ;MsgBox Bankroll!!!.
    }
else
    {
    ;MsgBox The icon was found at %FoundX%x%FoundY%.
    }

}

But the problem!
If the window is already open, and we run the script it all works!
And if you first run the script, and then opens a window where we look for the picture that does not work!
Please advice ...
Back to top
View user's profile Send private message
jl34567



Joined: 03 Jan 2010
Posts: 262

PostPosted: Mon Mar 01, 2010 2:48 am    Post subject: Reply with quote

MAybe the window needs a little bit of time to load.....try the addition I made below.......try adjusting the sleep time if it doesnt work. I had a similar issue with a mousemove where a pixel changed color when the mouse was over it.....If I didn't do a sleep after i moved the cursor to the pixel, it wouldnt catch the color change. I only needed a sleep 20.....so play with it , find out what works.

CoordMode Pixel, Relative
Loop {
WinWait, Tournament Registration
WinActivate
WinWaitActive<<<<<<<<<<<<<<<<<<<<<<<<<<[b]try this
Sleep, 100[/b]<<<<<<<<<<<<<<<<<<<<<<<<<<<
WinSet, Transparent, off
ImageSearch, FoundX, FoundY, 0, 0, 380, 330, buyin.bmp
if ErrorLevel = 2
{
MsgBox Could not conduct the search.
}
else if ErrorLevel = 1
{
WinClose
;MsgBox Bankroll!!!.
}
else
{
;MsgBox The icon was found at %FoundX%x%FoundY%.
}

}

There are a ton of good scripts for stars. What you're trying to do probably already exists.

I'm writing one for the Merge Network riight now.
Back to top
View user's profile Send private message AIM Address
lnmax



Joined: 26 Feb 2010
Posts: 4

PostPosted: Mon Mar 01, 2010 2:54 am    Post subject: Reply with quote

I have already consulted, the problem was in it.

Yes probably similar script already exists, but to find to me it was not possible (

Can you found?

All the same to use imagesearch it is not so good, it is necessary as to receive the text.
Back to top
View user's profile Send private message
jl34567



Joined: 03 Jan 2010
Posts: 262

PostPosted: Mon Mar 01, 2010 2:56 am    Post subject: Reply with quote

Let me open PokerStars really quick.
Back to top
View user's profile Send private message AIM Address
jl34567



Joined: 03 Jan 2010
Posts: 262

PostPosted: Mon Mar 01, 2010 3:05 am    Post subject: Reply with quote

I know HEM and PT can query the PokerStars server....and pull info out.

If you can findd out how to query the server, the rest should be easy.

I'm not sure exactly what you're trying to do, so I can't help with the looking for a script that does this.

If you let me know, I'll hunt around a bit.
Back to top
View user's profile Send private message AIM Address
lnmax



Joined: 26 Feb 2010
Posts: 4

PostPosted: Mon Mar 01, 2010 3:19 am    Post subject: Reply with quote

It is necessary not to allow to be registered in tournament not соответствуюшего a limit.

The screenshot has put, it is necessary to consider a limit from a window.
Back to top
View user's profile Send private message
jl34567



Joined: 03 Jan 2010
Posts: 262

PostPosted: Wed Mar 03, 2010 9:02 am    Post subject: Reply with quote

Any progress on this?? I'm working on my own issues right now.

My project got noticed.

http://www.pokersoftware.com/articles/2010/03/new-hotkey-program-for-merge-gaming-network.html
Back to top
View user's profile Send private message AIM Address
doyle



Joined: 14 Nov 2007
Posts: 325
Location: London, England

PostPosted: Wed Mar 03, 2010 9:51 am    Post subject: Reply with quote

Table Ninja?
Back to top
View user's profile Send private message Visit poster's website
jl34567



Joined: 03 Jan 2010
Posts: 262

PostPosted: Wed Mar 03, 2010 9:59 am    Post subject: Reply with quote

Haha......It's a preliminary layout......but I mean a GUI with a bunch of hotkeys can only look so many ways.....and add to that that it's for poker and how many ways are there really to lay it out?
Back to top
View user's profile Send private message AIM Address
doyle



Joined: 14 Nov 2007
Posts: 325
Location: London, England

PostPosted: Wed Mar 03, 2010 10:06 am    Post subject: Reply with quote

For what purpose do you need to do this?

I have scripted for PS, and am familiar with its behaviour.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group