|
#1
|
|||
|
|||
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?? |
#2
|
|||
|
|||
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. |
#3
|
|||
|
|||
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 |
#4
|
|||
|
|||
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. |
#5
|
|||
|
|||
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]) |
#6
|
|||
|
|||
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? |
|
|