Page 1 of 1

Insert image from path with text in field

Posted: Sat Mar 13, 2021 8:11 pm
by SEAL29
Hello.
I have one field "sampleimage" with name of image example House. This image path is /Volumes/HDD/Pictures/House.jpg
Now i create a button and what script is to find and insert automatically this 'House.jpg' into the standalone application using field with name of image.
So

Code: Select all

put the text of field "sampleimage" into tText
....
....
Update, i solved!

Code: Select all

   put the text of field "sampleimage" into tText
   put "/Volumes/HDD/Pictures/" into tPath
   put ".jpg" into tType
   create image "pic9" IN GROUP "red"
   set the filename of img "pic9" to tPath & tText & tType
   set the resizeQuality image "pic9" to "best"
   set the rect image "pic9" to "14,433,124,580"