| filsa.net: Frontier Scripting [ Script Archive | Ideas & Issues | Polyglot | Software | Projects ] |
|
|
|
Monday, June 28, 1999Web Image UtilitiesThree simple desktop scripts for working with GIFs and JPEGs |
|
|
Here are three desktop scripts I put together for a friend. They are very simple scripts, hardly worth mentioning, but I think they are good to show people just how fast and how powerful Frontier is. If you have people in the office who don't know Frontier, using one of these little desktop scripts might persuade them to want to get to know Frontier. Additionally, perhaps these will serve as examples of what you can do in just a few lines of Frontier. If you are just starting with UserTalk, this is a pretty safe area to explore in. The scripts make use of the file verbs, perhaps they will serve as a basis for more exploration of those verbs. The scripts are free. Modify to taste. I don't provide support or any warranties, but I hope you find them useful. Lots more info on Desktop scripts can be found in Chapter 9 of the Frontier manual. (search for it at www.scripting.com). Have fun! Thu, Jul 17, 1997 at 5:03:36 AM by PS PS. Get the package from the Downloads page. A note on usage These are all Desktop Scripts, meaning that they are meant to be double clicked from the Finder. (If Frontier is not already running, Frontier will launch.) Just doubleclick on these desktop scripts and follow the dialog directions. To look at the script, hold down the Command key while doubleclicking on the desktopscript, keep holding it down until the script opens in Frontier.
Add Image SuffixThis simple script loops through a folder chosen by the user, looking for GIF files and JPEG files. When it finds an image file, it attempts to add the appropriate suffix: .gif or .jpeg. There is lots of comments in this script, so even if you don't know UserTalk you should be able to figure out what is going on.
Strip Image SuffixThis desktop script does the opposite of the one above, I wrote it for testing purposes. It looks for image files, and strips them of their suffix, no matter what it is. A GIF file named clock.gif, clock.jpeg, or clock.whatever will be renamed clock.
Index Images: a really useful scriptIndex Images creates a handy HTML index of all the images in a folder, for easy viewing and quick reference. This desktopscript is good for showing people in the office just how handy Frontier is. It'll be a good help for the graphic guys who need an easy index for a big folder of graphics. The html file is called 'Image Index.html', and contains a table of useful information that can be printed. It generates sample <img> tags in the table that can be copy and pasted into a html file that you are working on. Also included are file size, height, width, file type, and the file name is hotlinked to the image so you can easily see what the image is. A little more complicated, but not difficult. Take a look at the code. Enjoy! |
|
|
|
|
|
This is Phil's Frontier Scripting Site. San Francisco, CA Copyright © 1996-98, Phil Suh. All Rights Reserved. http://www.filsa.net/frontier/software/webDeskscripts.html This page last built on 6/28/99; 11:13:53 PM |
|
| filsa.net: Frontier Scripting [ Script Archive | Ideas & Issues | Polyglot | Software | Projects ] |