Hi,
I want to run a batch file which does the same thing as a simple bash script,
but a few hours of wresling with it & I'm failing miserably (from QGIS v2.2)
Any help appreciated.
In Linux the action command takes 2 parameters from the QGIS action call:
get_catch [ %trip_code% ] [ %station_no%]
Under Windows, catch.bat contains:
@echo off
SET DB=kah1402
SET HOST=host
SET USER=user
SET TRIP=%1
SET STN=%2
start "%TRIP% %STN%" /w "c:\Program Files\Postgresql\9.3\bin\psql.exe -d %DB%
-h %HOST% -U %USER% -c "select species, weight from t_catch where
trip_code=%TRIP%' and station_no='%STN%' order by weight desc;"
This works perfectly from the cmd.exe command line, eg, running: ".\catch.bat
kah1402 33"
returns the correct data in the terminal window - now I want to invoke this
from QGIS as an action, getting the parameters from the clicked feature
displayed in a new terminal/command window. So far, I have been unable to get a
QGIS action to open a command prompt window in Windows at all.
Any suggestions appreciated. There must be a few people out here using QGIS &
Windows :-)
Thanks,
Brent Wood
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user