How to display a picture with AppleScript only

Hello to all .
New to AS and also to this forum, I am seeking help to display a picture at a given place with AppleScript.
With the 13 Fuctions Keys I call some applications, with Shift-FKey some other applications, with Ctrl-FKey some documents, with Option-FKey some folders and finally some Scripts with OA-FKey . This makes a lot to memorize. I want to store in one F-Key a script that will display a “Dock-like” picture (handmade once for all) showing the icons of the application ( or docs or folder ) in each FKey, a kind of memo, what is where. The picture is ready. I do not want the script to order Preview (or another app ) to open it because of the time to launch the app and because there is a large “border” with the tools. I would like AppleScrpt to draw the picture itself. I thought about the command “data” but I do not know whether it is feasible nor how.
Could someone, please, help me ?
Alain

Short of turning the toolbar off in Preview I don’t think there is a better way to do this. You could set your desktop background to the image perhaps?

Sorry not a huge help I know, but I couldn’t find a better way with the reserch that I did.

Thanks you James.

Ideally, I would like to display only one row out of the 5 possible ( F-Key menu, Shift-F-Key menu, Ctrl-F-Key menu,…).
Embedded in the Desktop picture would require the 5 “menus” stacked one on another, to be there all the time .
Yes, that would be a Memo, but lacking Elegance ! A bit like sticking a cardboard to the keyboard !

Preview, without the Tool bar , would be much better .

If “data” cannot do it, could there be a Terminal command line (or shell script) that could do the trick ?
I did not approach that area , but keep hearing that Terminal is allmighty !

Thanks for the try anyway James !

Alain

Hi Alain.

This is a shot in the dark really but what about a widget.
I don’t think it’s to hard to convert an already available widget to something that would display a picture. you could just invoke dashboard everytime then.

Sorry if this doesn’t help

What you want to do is really an XCode project. There you would design the interface - your strip window with 13 buttons on it and have the scripts display the appropriate label for each and do the right thing if you clicked one. I’m afraid you really can’t do this in plain vanilla AppleScript.

Thank you Adam, Pidge and James .
I thought my knowledge of AppleScript was not going far enough, at least with your help I shall not pursue an illusion and reach a dead end .

Thank you also for replying , that’s nice from you guys to take the time to read, think and answer !

Best regards to all.
Alain

Hi Alain,

A little more elegant way would be to have 5 different desktop pictures with a different row for each picture and tell “Desktop Preferences” to change the pics every so often. Who knows, this may even be scriptable, I couldn’t say.

Sorry to be chiming-in so late, but I’ve only just stumbled upon your post. My bad.

'hope this helps.

Sincerely,

Variable as the Shade

Browser: Firefox 1.5.0.9
Operating System: Mac OS X (10.4)

As you want to display only keyboard shortcuts why use an image at all? You could display a text box much easier, with the option to edit the memo’s later.

I may be missing the point of this thread, it late here, but could you not use growl to display your image.

or the ‘Sec helper’ app which is found with salling clicker, I use this to display images on my screen.
salling clicker has a trial version and is well worth the money for its job, but the ‘Sec helper’ app will work regardless of purchase.

example script for the ‘Sec helper’ :


set theImage to "/Users/Username/Desktop/Untitled-1.tif" as string
set the_image to POSIX file theImage as alias
tell application "SEC Helper"
	show screen message "FKey apps" duration 5 image the_image
end tell

But I think if you can do the same with growl you can place where the image pops up

Just back from long Week-End .

Thank you Variable, Stadsman and Mark !
I shall try your sugestions and keep you posted should I discover something interesting !

Regards to all.
Alain

Mark,

Your script works beautifully with my “memo-image” ! Thank you !
I tried with Growl but did not succeed yet.
I have two questions :

  • What is " POSIX " in your script ?
  • Is it possible for the message to appear at the bottom of the screen ?
    ( I am new to AppleScript ! )

Regards,
Alain

In this case the POSIX file line converts the unix type path “/Users/Username/Desktop/Untitled-1.tif”
to the Applescript type path “Macintosh HD:Users:Username:Desktop:Untitled-1.tif”

You could of cause use the apple type path at the start or other forms of file selection.

look here for a better explanation .

I’m not sure you can do this with the SEC Helper.
I have not had a chance to try anything with growl and can not say when I will. But if I do I will post back here.

Here’s an explanation of how to use Growl to display an image: http://growl.info/documentation/applescript-support.php#usingImages