Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-13-2006, 02:47 AM
Kovner Kovner is offline
Senior Member
 
Join Date: Jun 2004
Posts: 551
Default Quick AHK Question for the experts

I'm trying to make a script to display the AvgPot size from the lobby somewhere on the table itself.
I checked out Roland's code from miniLobby to get the pot size, but what should I use to display it onto the table?
Is there some AHK function to display text, thats not on a button? I suppose I could use ControlSetText on one of the buttons, but there's gotta be a better way. Is it possible to change the text of the title bar?

Edit: Also, is this how I should ask questions like this?

Edit: OK I found WinSetTitle. Will this mess with PP's execution in any way? Do you guys have any idea for a better way to display the info?
Reply With Quote
  #2  
Old 05-13-2006, 07:40 AM
Kovner Kovner is offline
Senior Member
 
Join Date: Jun 2004
Posts: 551
Default Re: Quick AHK Question for the experts

Alright - I have the code to get the avg pot for a table. Now I just need a way to display it. I tried using WinSetTitle and it doesn't seem to work. Maybe PP is resetting the table name, but if I use WinSetTitle and then immediately use WinGetTitle, I get the original name.
Reply With Quote
  #3  
Old 05-13-2006, 10:29 AM
Adde Adde is offline
Senior Member
 
Join Date: Oct 2002
Location: Sweden
Posts: 2,453
Default Re: Quick AHK Question for the experts

In lack of a method to draw directly on the window with AHK (like PA HUd does), I throw up a GUI window with the text. Here are some code snippets from TN.

Gui, %guiNum%: +alwaysontop +Lastfound +Owner
Gui, %guiNum%: Color, ffffff
Gui, %guiNum%: Font, S9 Bold, Verdana
Gui, %guiNum%: -Caption
Gui, %guiNum%: Add, Text, x8 y2 w95 , POT_AVERAGE
Gui, %guiNum%: Show, w100 h20 x%x% y%y% NoActivate

You need to manage a different gui for every table, and have a timer check if the gui should be shown or not. See my AutoSit code in TN for more.

Adde
Reply With Quote
  #4  
Old 05-13-2006, 04:50 PM
Kovner Kovner is offline
Senior Member
 
Join Date: Jun 2004
Posts: 551
Default Re: Quick AHK Question for the experts

OK - great. Thanks Adde. I should have this script done sometime soon.
Reply With Quote
  #5  
Old 05-13-2006, 09:16 PM
Kovner Kovner is offline
Senior Member
 
Join Date: Jun 2004
Posts: 551
Default Re: Quick AHK Question for the experts

This script is all but done, except for one minor thing:
Is there a way to have the gui be only on top of a specific table?
Using +alwaysontop makes it so that if something overlaps the table, the gui will display on top. That's a slight annoyance (though, it works correctly when the table gets minimized).
Reply With Quote
  #6  
Old 05-14-2006, 08:19 AM
jukofyork jukofyork is offline
Senior Member
 
Join Date: Sep 2004
Location: Leeds, UK.
Posts: 2,551
Default Re: Quick AHK Question for the experts

[ QUOTE ]
In lack of a method to draw directly on the window with AHK (like PA HUd does), I throw up a GUI window with the text. Here are some code snippets from TN.

[/ QUOTE ]
I think this might be possible using DllCall and the SetParent() function.

Mogobu tried this (even though SetParent isn't meant to be used on other processes' windows) and it seems to work fine.

Juk [img]/images/graemlins/smile.gif[/img]
Reply With Quote
  #7  
Old 05-14-2006, 12:00 PM
Kovner Kovner is offline
Senior Member
 
Join Date: Jun 2004
Posts: 551
Default Re: Quick AHK Question for the experts

[ QUOTE ]

I think this might be possible using DllCall and the SetParent() function.

Mogobu tried this (even though SetParent isn't meant to be used on other processes' windows) and it seems to work fine.

Juk [img]/images/graemlins/smile.gif[/img]

[/ QUOTE ]

Where is this code?
Reply With Quote
  #8  
Old 05-14-2006, 12:16 PM
jukofyork jukofyork is offline
Senior Member
 
Join Date: Sep 2004
Location: Leeds, UK.
Posts: 2,551
Default Re: Quick AHK Question for the experts

http://www.autohotkey.com/docs/commands/DllCall.htm

http://msdn.microsoft.com/library/defaul...s/setparent.asp

The bit that says: "The new parent window and the child window must belong to the same application." may cause problems as your not really supposed to do this, but Mogobu did test this and found it worked ok for Party.
Reply With Quote
  #9  
Old 05-14-2006, 10:26 PM
Kovner Kovner is offline
Senior Member
 
Join Date: Jun 2004
Posts: 551
Default Re: Quick AHK Question for the experts

Sorry, I meant where is Mogobu's code that does that? It isn't really clear to me how it'd work.
Reply With Quote
  #10  
Old 05-15-2006, 03:08 AM
Roland Roland is offline
Senior Member
 
Join Date: Mar 2005
Location: Norwich, UK
Posts: 2,703
Default Re: Quick AHK Question for the experts

Kovner,

have a look at this. I found it only a few days ago and couldn't really get it to work with Party tables (works well with notepad though for instance). Maybe you have more luck.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.