Two Plus Two Publishing LLC Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > Internet Poker > Software

Notices

Software Discussions about gambling-related and poker software.

Reply
 
Thread Tools Display Modes
Old 08-01-2012, 02:40 AM   #1
centurion
 
Join Date: Oct 2006
Location: Wherever it is legal.
Posts: 195
AutoHotkey Question

I am trying to write an autohotkey script that will change the holecards for a given NoteCaddy definition then save it as a new definition. Rinse and repeat for all 169 starting hands.

Selecting each starting hand would correspond to a certain (x,y) coordinate, i.e. sending the mouse click there. With autohotkey, is it possible to create a loop (for i=1 to 169) where each i gives the set x,y coords when the x and y numbers themselves do not follow a useful mathematical pattern?

Any help is greatly appreciated.
Zobags is offline   Reply With Quote
Old 08-01-2012, 09:18 AM   #2
Carpal \'Tunnel
 
jukofyork's Avatar
 
Join Date: Sep 2004
Posts: 10,209
Re: AutoHotkey Question

Here's an example of iterating through a set of coordinates in a loop from one of my scripts:
Code:
  ; This holds the counts.
  TotalGoodRegulars := 0

  ; These hold the coordinates of the notes icons for each seat.
  VarNotesX := "322|440|468|436|311|150|33|9|37|154"
  VarNotesY := "70|107|170|270|287|287|259|173|93|70"
  StringSplit, ArrayNotesX, VarNotesX, |,
  StringSplit, ArrayNotesY, VarNotesY, |,

  ; Lets go round each seat and check for their notes icon being present.
  Loop, 10
  {
    ; Check notes icon.
    xx := x + (ArrayNotesX%a_index% * (w/533))
    yy := y + (ArrayNotesY%a_index% * (h/396))
    PixelGetColor, col, xx,  yy
    if (col = 0x0000FF)
      TotalGoodRegulars := TotalGoodRegulars + 1
  }
You should be able to adapt that to do what you want.

Juk
jukofyork is offline   Reply With Quote
Old 08-01-2012, 01:13 PM   #3
centurion
 
Join Date: Oct 2006
Location: Wherever it is legal.
Posts: 195
Re: AutoHotkey Question

Awesome! tyvm
Zobags is offline   Reply With Quote
Old 08-01-2012, 06:07 PM   #4
veteran
 
SretiCentV's Avatar
 
Join Date: Oct 2006
Location: In the rear with the gear
Posts: 2,590
Re: AutoHotkey Question

imho it would be cleaner to write a script to manipulate the xml files directly
SretiCentV is offline   Reply With Quote
Old 08-02-2012, 01:00 AM   #5
centurion
 
Join Date: Oct 2006
Location: Wherever it is legal.
Posts: 195
Re: AutoHotkey Question

Quote:
Originally Posted by SretiCentV View Post
imho it would be cleaner to write a script to manipulate the xml files directly
I agree with you, but not sure if I am good enough with AHK to do that. Using find and replace isn't always viable because sometimes the holecards appear in other places in the file, that we wouldnt want to change. If there is an quick and easy way to do this, I definitely would appreciate any insight.

Thanks.
Zobags is offline   Reply With Quote
Old 08-02-2012, 07:16 AM   #6
veteran
 
SretiCentV's Avatar
 
Join Date: Oct 2006
Location: In the rear with the gear
Posts: 2,590
Re: AutoHotkey Question

Yeah I wouldn't use AHK for it. However, if your experience is exclusively in that then your approach was good
SretiCentV is offline   Reply With Quote
Old 08-02-2012, 08:55 PM   #7
Carpal \'Tunnel
 
Join Date: Aug 2004
Posts: 7,152
Re: AutoHotkey Question

if you choose to go the XML route here is an AHK library that might be of use:
http://www.autohotkey.com/community/...ic.php?t=17549
greg nice is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 11:15 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.
Copyright © 2008-2010, Two Plus Two Interactive