Borderless image, scriptable

I'm pessimistic about this at my skill/knowledge level, and (unless Applescript is able to do some things I'm not expecting) it has to do with Applescript in only a peripheral way. But I'll ask anyway.

Briefly, I'm looking for a way of opening an image file in such way that the screen image has absolutely no border -- not a border that's part of the image and not a window border. No border.

Actually, I've found FFView.app (freeware downloadable via macupdate.com) which does this very nicely (see for yourself), but is barely scriptable -- it produces a rectangular image display that indeed has no border. But the display isn't a window, or at least it doesn't act like one in my estimation.

My Applescript requirements for controlling this image might seem relatively modest (open image file, close image, and, the most difficult, "get/set bounds.")

How FFView accomplishes the borderless image is beyond me. Ideally, I need to find a scriptable image browser that can display an image file in a window that's been stripped of its border but still can be ordered around by Applescript. Despite a lot of looking, I haven't found any such thing. In fact, most "conventional" image browsers don't seem to be scriptable at all.

Am I missing something? Suggestions? Ideas?

Message was edited by: Noaks

MAC pro, Mac OS X (10.4.11)

Posted on Apr 2, 2009 6:15 PM

Reply
13 replies

Apr 2, 2009 7:35 PM in response to orangekay

The window title bar would be one of the borders I'm referring to.

If you look at the image presentation with FFView.app ("Borderless image window" selected in the General Preferences), you'll see only image content, nothing else.) If I could get/set the bounds of that presentation with Applescript, my requirements might be met.

Apr 2, 2009 8:39 PM in response to red_menace

Well, the bounds have to do with where the image is displayed on the screen, doesn't it? I need control over that.

I've looked at GraphicConverter a lot (it's a pretty comprehensive piece of work). If I could make it dispense with its window border (title bar and all), I'd be golden. Have a look at the borderless image presentation in FFView.app. Perhaps there's a way of exactly setting that presentation's screen position which I haven't discovered.

Actually, GraphicConverter's window border is relatively non-obtrusive; but for aesthetic reasons, in this instance I prefer NO borders.

Apr 2, 2009 8:47 PM in response to Noaks

Noaks wrote:
Well, the bounds have to do with where the image is displayed on the screen, doesn't it? I need control over that.


No. You can draw an image anywhere you want, you just can't do it in AppleScript.

Maybe if you describe what the actual goal is rather than your interpretation of the intermediary steps you think are necessary someone might be able to suggest something more suitable, like a QuickLook slideshow or a PDF/PowerPoint/Keynote presentation.

Apr 2, 2009 8:57 PM in response to orangekay

That may be so, but how does that affect my wish to have a totally borderfree presentation and ALSO be able to control the screen position of the presentation with Applescript? There are several applications I have that will display the image in a window which I can move any place I want on the screen -- but the window border is always present.

There are full-screen presentations without borders, but that's just what they are: full-screen. I don't want full-screen. (Hmm. That makes me wonder if I could use AS to define the screen size as much smaller than it really is and somehow convince the image application to present a borderless "full-screen" presentation in that smaller size which could be appropriate for my needs. Just dreaming.)

(See also my response to red_menace on this.)

Apr 2, 2009 9:13 PM in response to orangekay

Yes, but I did specify Applescript. This is a small detail in a larger AS project; the image is moved around (sometimes in very small but repeated steps), as other things are going on. I would simply prefer the image to have no borders. I have written an algorithm of sorts that allows me to do this with images presented in a bona fide window whose bounds can be set with AS, and it works well --but the window border is always present. Is this still unclear?

Apr 2, 2009 9:32 PM in response to Noaks

Ah - I misunderstood your request as displaying an image with nothing else on the screen (not necessarily full-screen, but with the rest of the screen black). A borderless window would be a feature of the particular application, but you aren't likely to find much since it is a bit tricky to manipulate documents/windows without any controls in them. Another idea would be to use a movie player to "play" the image - a Quicktime movie can be modified to have no border, but it seems to be a bit of a pain to do it. You might take a look at NicePlayer - it is a movie player that uses a borderless window, but you can open images in it and it has AppleScript support.

Apr 3, 2009 5:23 AM in response to red_menace

Hi red_menace,

You wrote "You might take a look at NicePlayer - it is a movie player that uses a borderless window, but you can open images in it and it has AppleScript support."

Well, that looks promising and it does have AppleScript support, but I can't figure out how to open an image (say, from a .jpg file) in it. Am I stupid, or what?

Apr 3, 2009 5:55 PM in response to Noaks

The application won't allow you to add from it's dialog, but you can open an image from the Finder or use an AppleScript to add to the playlist. The following script will add a number of items to the playlist, where you can select one to view (I enabled the playlist drawer to let you choose). SInce this is a movie player, set the repeat preferences to "Repeat Single Movie" so it will stay on the selected playlist item.

<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFEE80;
overflow: auto;"
title="this text can be pasted into the Script Editor">
tell application "NicePlayer"
activate
try -- get the playlist
set ThePlayList to (playlist of window 1)
on error -- no window
set ThePlayList to (make new playlist)
end try
tell window 1 -- change some properties
set bounds to {100, 100, 740, 580}
set playlist is showing to true
set fixed aspect ratio to true
end tell
set TheMaximum to 3 -- a number of items to add
repeat with TheItem from 1 to TheMaximum -- add to the playlist
add (choose file with prompt "Select file (" & TheItem & " of " & TheMaximum & "):" without invisibles) to ThePlayList
end repeat
end tell
</pre>

Apr 4, 2009 8:13 PM in response to red_menace

I'm still finding significant puzzles in using NicePlayer for my purposes, but I've made some progress -- and it might even offer some possibilities I hadn't thought of. I'll keep at it.

When I wrote my "am I stupid or what?" response, I had been trying to use NicePlayer more like a conventional image browser. If I launched NicePlayer and went to file>Open File, I would find all single-image candidates (.jpg's and the like) grayed out (and of course non-responisve). I found that I could circumvent this in two ways:

• By replacing ".jpg" (or whatever) with the ".mov" name extension; as long as the file contained image content, NicePlayer would open the file and display the image. This kind of trick often doesn't work for me, but this time it did.

• By using AppleScript, e.g.,

tell application "NicePlayer"
activate
open file "MAC HD:Users:pj:Desktop:Z-FIT001.jpg"
end tell

+This works in AS without changing the ".jpg" name extension!+

In the meantime, I've marked the question as solved. If there are additional suggestions, I certainly wouldn't object.

Thanks, red_menace, for your help on this.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Borderless image, scriptable

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.