Insert image from path with text in field

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
SEAL29
Posts: 61
Joined: Fri Oct 02, 2020 3:32 pm

Insert image from path with text in field

Post by SEAL29 » Sat Mar 13, 2021 8:11 pm

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"

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”