SC, Image Files and MPI

Click on an image to open a fullsized version in another window.

Add File... Button
Add File... Button 202 by 164

PI button Properties Card
PI button Properties Card 586 by 135

Adding Files 1

In the MPI tools palette switch to the buttons card, and drag a Bevel button to the card above the imagelist field. [in the rte you again need to draw a button].
The PI will reflect the selection, switching to the button card, name the button Add File...

Edit the script of the button (Command-E or Script from the Edit... popUp on the PI)

In the Script Editor lines of a script with -- at the start are comments, they do not get interpreted, in these pages I'll show them as red.

on mouseUp
answer picture file "Choose an image:"
--picture ensures that SC will only let you choose a image file
--after choosing a file it's filepath will be placed in the it variable

if it is empty then exit mouseUp
put it into tFilePath
set the itemDel to colon
put last item of tFilePath into tFileName
put tfileName into cd fld "imageList"
set the uImagePaths of cd fld imageList to tFilePath
end mouseUp

This will put the file name into our field, and set the field's userProp to the file path.
Switch to the browse tool, from the tool module or by using control-tab and test the button.
Unfortunatly this will replace the whole content of the field every time we choose an image. We need to be albe to build a list...