Hi mmasson,
mmasson wrote:Is there a simple way to specify in a script an image file that is to be placed into a particular location on a card?
"Simple" is relative
mmasson wrote:If there is such a command, it would have to take the image file path and name and the location on the card as parameters.
No, there is of course NOT such a command, but this can be easily scripted, see below.
mmasson wrote:Can this be done without first creating an image field on the card?
To avoid misunderstandings, please use the correct terminology! image <> field!
So you mean an "image object".
This DOES requre to create an image object! No image object, no image
OK, here a handler the accepts three parameters:
1. absolute path to the image field
2. X location on the card
3. Y location on the card
It does not take into account if the image is bigger than the current card, I will leave this up to you

Drop a line if you need help with this, too.
And of course it does not check for errors like WRONG parameters etc.
Since you want to do this by script, I am sure you will provide the correct params
Please check the very useful "templateimage" (and other templateXXX) in the dictionary!
Code: Select all
command placeImageOnCurrentCard tFilePath,tX,tY
lock screen
set the filename of the templateimage to tFilePath
set the loc of the templateimage to tX,tY
create image
reset the templateimage
end placeImageOnCurrentCard
Done
Call it with where- and whenever you need:
...
placeImageOnCurrentCard "/Users/klaus/Desktop/Images Net/banana.png",100,100
...
Best
Klaus