Can this be done ??

Hi everyone,
I am very new to AppleScript Studio applications.I was wondering can this be possible ??
I think everyone has seen the finder options.There,we have one option where from we can set the background of the finder window.It gives three options : like “white”,“some background color” or “some picture file”.I am interested in the third option.

Can this be done in any window of AppleScript Studio application??Like,can i have a window with some picture file displayed in the background ??

Any pointers in this direction would be highly appreciated…

:?

Simply import any file into your PB project (eg, “whatever.tiff”), go to IB and drop a image field in a window. Select it and type “whatever” in the properties pane.

There’s a little more to it than that, jj :wink: . jj is right, you’ll need to connect an image view item into your window and set it behind everything else but you may want to add more options for how the image is displayed (scaled, proportionate fit, 100%, centered, top left alignment, does it change size if the window is resized, etc.). I think this is much more flexible than what Apple provides via the Finder and you could even hook it up via drag and drop.

Jon

Thanks jj & jonn for the reply.
Ya,i followed the same and got a background picture also.But,the picture can’t be put in the background dynamically.What i mean is that in Finder,like you can choose any picture file to be in the background,Can the same be achieved !!

Waiting for your replies !!

Sure!

set theImg to (choose file)
set theImg to (load image theImg)
set image of image view 1 of window 1 to theImg

Take a look at this quick project: PictureWindows. It should get you started.

Jon

PS jj, I think you need to use a POSIX path for the load image statement.

If you use these after the “choose file” statement…

log theImg --> "/x/y/z.jpg"
log (theImg as text) --> "alpha:x:y:z.jpg"

Thanks John !! Its too much.Thanks for making a small project for me to show me the usage.basically,i didn’t go through it.But,i have seen it working.

I envy you guys :shock: You guys know lot about Applescript Studio.Can you suggest me some good books on it??

thanks once again JJ & John