so here is a complicated one -- well , it's complicated for me

I wish to do an sql query and shove the returns as vars into a convert on
a jpg.

ususally I have used win bat files to do an imagemagick convert

example here is my bat file:

-----/ start bat file

 convert D:\uofM\lable\mich-b.jpg ^
-fill black -pointsize 24 -draw "text 150,460 'File Name : FName6'" ^
-fill black -pointsize 24 -draw "text 150,490 'Title : TName6'" ^
-fill black -pointsize 24 -draw "text 150,520 'Creator : Creater'" ^
-fill black -pointsize 20 -draw "text 150,550 'Time : hh:mm:ss'" ^
-fill black -pointsize 18 -draw "text 150,580 'Date : dd/mm/yy'" ^
 D:\uofM\lable\dog\mich-b-666.jpg

but I wish to have FName to come from a database
so I have cobbled together this vbs
-/ start vbs
'******************************************************************************************
'Script Name: uofm01
'Author: js
'Created: 11.25.2008
'Description: First attempt at MySQL Connection using local DSN - MySQL
3.51 ODBC Connector
'******************************************************************************************
'Script Initialisation

OPTION EXPLICIT
Dim objDB,arrRecord,strRecord,strOutput
Dim oRS, nRec, oFld

'Main Processing section
'Database connection & select all from Table
Set objDB = DBConnect()
Set oRS = objDB.Execute("SELECT name FROM asset_master where collection =
'0434' and collectionItem ='938'")
'Dump Records from Table
WScript.Echo "Recordset Dump:"
nRec = 0
Do While Not oRS.EOF
  WScript.Echo "-----", nRec : nRec = nRec + 1
  For Each oFld In oRS.Fields
      WScript.Echo oFld.Name & " = " & oFld.Value
  Next
  oRS.MoveNext
Loop

'Procedures section
'This function sets up DB Connection using specified DSN
  Function DBConnect
  Set objDB = CreateObject("ADODB.Connection")
  objDB.Open "ss_michigan"
  Set DBConnect = objDB
End Function


------------------------
basically I am thinking this  'direction' of bats & vbs on a win machine
is folly....and I wish to ask the forum -- "what do you think?"

would a better idea be -- what? -- perl? or php?
actually I think I like the idea of PHP ( but I do not know much PHP )

I wish to First query the db and get values of 4 -5 things from the db and
then use those to make a convert call & create the jpgs

what is a ' direction' that might be better?

thanks

j


_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to