Page 1 of 1

Relative address using ImportPicture

Posted: 2024-12-21 07:13:00
by fulvio53s03
In a script I would like to import an image from a local file with ImportPicture(Address_image) where Address_image is a field containing the relative address of the image itself.
The AMC application is located in C:\portables\Ant Movie Catalog
the database AMC is in f:\archives\Science Fiction and the image is in f:\archives\Science Fiction\images\image1.jpg.
I would like to be able to move the Science Fiction\images folder to another address, for example d:\Science Fiction\images without having to update the script.
What relative address should I indicate in Address_image ?
Thank you.
:??:

Re: Relative address using ImportPicture

Posted: 2024-12-22 14:00:07
by antp
So you mean that you want to be able to import pictures from a path relative to the catalog itself?
The documentation says that the current path is by default the catalog's path, so I would expect that providing "images\image1.jpg" would work?
Have you already tried that?

Re: Relative address using ImportPicture

Posted: 2024-12-22 15:42:42
by fulvio53s03
antp wrote: 2024-12-22 14:00:07 The documentation says that the current path is by default the catalog's path, so I would expect that providing "images\image1.jpg" would work?
The tip was great! The images must be in a folder contained in the same folder as the catalog and the program can be anywhere on the PC (I will try to check if everything can fit on removable media, such as CD or DVD).
an example:program: "C:\portabili\Ant Movie Catalog\MovieCatalog.exe"
dataBase : "F:\$$$ Megasync\$$$ Fantascienza\Fantascienza.amc"
image : "F:\$$$ Megasync\$$$ Fantascienza\Galassia (La Tribuna)\immagini\Galassia_001.jpg"


and in the script:
Address_Image := 'Galassia (La Tribuna)\immagini\Galassia_001.jpg';
ImportPicture(Address_image)
;