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-2007, 11:02 PM
MSPChris MSPChris is offline
Member
 
Join Date: Mar 2005
Posts: 70
Default Running Postgres from an AHK script -- Help?

Can someone point me toward some references on running PG queries from within an AHK script?

I know I've seen it either here or on overcards...but I've searched for about 1/2 hour... help??
Reply With Quote
  #2  
Old 05-13-2007, 11:10 PM
_dave_ _dave_ is offline
Senior Member
 
Join Date: Feb 2005
Location: UK
Posts: 2,628
Default Re: Running Postgres from an AHK script -- Help?

right at the bottom of the overcards.com AHK page:

http://www.overcards.com/wiki/moin.c...tgresFunctions

My Postgres include function.

you need to make sure to either have "Program files\postgresql\8.x\bin in your PATH environment variable, or (easier) copy "psql.exe" into your script's folder.

Post here if you have trouble with it - there are a few examples of use in the StarsBuddyList script, and in a few others.

dave.
Reply With Quote
  #3  
Old 11-28-2007, 05:54 PM
Thek Thek is offline
Senior Member
 
Join Date: Sep 2003
Location: In position
Posts: 115
Default Re: Running Postgres from an AHK script -- Help?

Hi Dave

Im trying to run your postgres_test AHK script, but can't seem to get it working.

PATH etc. is in order.

I keep getting 3 error files:
20071128225001_postgres_test.ahk_9469_error (0 kb)
20071128225001_postgres_test.ahk_9469_out (0 kb)
20071128225001_postgres_test.ahk_9469_in (1 kb)

The last file says:

\f '\t'
SELECT screen_name, COUNT(g.player_id) AS hands, round(AVG(vol_put_money_in_pot)*100,2) AS vpip, round(AVG(pre_flop_raise_n)*100,2) AS pfr FROM players p, game_players g WHERE p.player_id = g.player_id GROUP BY screen_name ORDER BY hands DESC LIMIT 10;
\q


Any ideas on what Im doing wrong?

Thanks
Reply With Quote
  #4  
Old 11-28-2007, 06:00 PM
_dave_ _dave_ is offline
Senior Member
 
Join Date: Feb 2005
Location: UK
Posts: 2,628
Default Re: Running Postgres from an AHK script -- Help?

Does it pop up any message?

If there is a problem there should be something in the "error" file.

Have you copied psql.exe to the same folder as the script?

Also, this query may take a little while to run.
Reply With Quote
  #5  
Old 11-28-2007, 06:04 PM
Thek Thek is offline
Senior Member
 
Join Date: Sep 2003
Location: In position
Posts: 115
Default Re: Running Postgres from an AHK script -- Help?

Hi Dave

No, no popup at all.

Yes, both the psql.exe is in the same folder (and in the PATH enviroment)

Been more than 1½ hour now (with only 4000 HH in DB [img]/images/graemlins/blush.gif[/img])
Reply With Quote
  #6  
Old 11-28-2007, 06:09 PM
_dave_ _dave_ is offline
Senior Member
 
Join Date: Feb 2005
Location: UK
Posts: 2,628
Default Re: Running Postgres from an AHK script -- Help?

no way it should take that long... are you on vista?

EDIT: or is postgres on a port other than 5432?
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 06:10 PM.


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