Two Plus Two Poker Forums AutoHotkey Question
 Register FAQ Search Today's Posts Mark Forums Read Video Directory TwoPlusTwo.com

 Notices

 Software Discussions about gambling-related and poker software.

 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.
 08-01-2012, 09:18 AM #2 Carpal \'Tunnel     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
 08-01-2012, 01:13 PM #3 centurion   Join Date: Oct 2006 Location: Wherever it is legal. Posts: 195 Re: AutoHotkey Question Awesome! tyvm
 08-01-2012, 06:07 PM #4 veteran     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
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 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.

 08-02-2012, 07:16 AM #6 veteran     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
 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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are Off Pingbacks are Off Refbacks are Off Forum Rules

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

 Contact Us - Two Plus Two Publishing LLC - Privacy Statement - Top