Relative address using ImportPicture

If you need help on how to use the program
Post Reply
fulvio53s03
Posts: 744
Joined: 2007-04-28 05:46:43
Location: Italy

Relative address using ImportPicture

Post 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.
:??:
Last edited by fulvio53s03 on 2024-12-22 17:11:37, edited 1 time in total.
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Relative address using ImportPicture

Post 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?
fulvio53s03
Posts: 744
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Relative address using ImportPicture

Post 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)
;
Post Reply