Last Modified: 4/25/2007
 contact: Chipp Walters
Home altSQLite Newsletter Column MagicCarpet About Downloads altPlugins Links Useful Scripts Notes Tutorials Chipp.com ButtonGadget Video Tutorials Synergy for OSX Misc Search
Downloads
Example programs, Libraries and runtimes.
altThumbBrowser Control
altThumbViewer control is used to scroll through a folder of images.  This demo stack will prompt you for a folder, then display the first image scaled properly in the folder in the window below. The user can use the scrollbar to scroll through all the images in the folder. There are custom properties for filtering images, accessing the path of the visible image and resizing and repositioning the control. You can cut and paste this group into your stack to use it. Just read the docs.

This control works on Windows, should work on Linux. It will work on Macs ONLY when accessing files with .gif,.png,.jpg,.jpeg file extensions. If someones decides to modify so that it views all Mac image TYPEs, let me know and I'll repost it here. It shouldn't be difficult, I just don't have time to code and test for Mac.
Be notified of new updates!
Now you can be automatically notified when this website has new items added. Just go to the Notification form at the bottom of the About page and press submit. We will send you an email* each time the website is updated.
Application Starter Kit
I really like the Toolbar action of RunRev, so I decided to take it apart and recreate it for a couple of my own projects. I ended up creating a 'starter kit' for applications using this Toolbar stack.

Feel free to use it however you like.

(only tested on WinXP)
Image Compositing
This is a helpful stack which has a number of pretty cool handlers for manipulating images. Using scripts only, this stack shows how to layer multiple images with different levels of transparencies on top of each other into a single image. The scripts have only been tested on PC, but are designed to work on Mac and Linux. Let me know below if you find any problems.
Image Tools Example
While playing around with Scott Raney's Convolution Matrix example in his externals tutorial for MetaCard, I decided to create a software only version which can be incorporated into any stack on any platform. While this technique is substantially slower, it does work and demonstrates the power of the imagedata property.

Using this stack you can play around with the following image effects:

-blur
-sharpen
-find edges
-color emboss
-soften
-soften (less)
-and others

Also included in the .zip download is Scott's external.dll (windows only) which demonstrates the same effects, only much faster. Place it in the same folder as MetaCard or the Revolution app. If anyone has compiled the XCMD, please let me know and I'll include it in this download. This stack *should* work correctly on all version of MC and RR, for all platforms. Let me know if you find any problems!

altCursorLib
This is a Cursor Library stack inspired by Monte Goulding's libCursor stack. It uses the set the default cursor method rather than the lock cursor method. There are a number of other refinements as well.

Thanks to Jerry Daniels for his help on this stack.
Altuit XML TreeView List Control
Altuit's XML TreeView List Control can be set using a single command and XML string. Along with customized rendering options, it can also automatically process handlers with parameters based upon which line is clicked. It maintains a 'state' for the last clicked and available item. Custom icons can be set for each item as well. Simple to use:

set the altXML of fld ListXML to {XMLstring}
*NOTE: This control only works with RR greater than 1.1.1 or MC greater than 2.4.1


Features:
The XMLTreeView control lets you:

·Customize the + and - expand/contract buttons. Just replace the images: imgMinus and imgPlus with ones you wish to use.
·Change the Font Name, Size and Style. Just be sure to check the 'Fixed Line Height' checkbox.
·Assign different icons for different list items. Any element can have an icon attribute, which when set to an image, will display for its' respective list item. Use the fixedLineHeight property settings to expand the line to accomodate different sizes of icons
·Assign handler with a custom parameter for a list item. Any element can have an attribute which lists a handler to call when clicked on along with a custom parameter if so desired.
·Support for unlimited(?) nested elements. (Currently only tested to around 5, but it should work as the parser is iterative).
V beta 0.91 - fixed ink mode of hilite graphic on MacOS V beta 0.92 - fixed bug on hiliting when starting up. V beta 0.93 - added the "nolink" attribute so a list item does not necessarily call a handler. See instructions. V beta 0.94 - fixed a bug in the handler parameter code.

altSAFileUp Library
The altPostSAFileup command posts files and form data to a Microsoft Internet Information Server (IIS) using the industry standard Sofware Artisans FileUp ActiveX control. It sends the completedMessage when finished. The HTTP response can be accessed from the custom property altSAFileUpResponse which can be checked in the completedMessage handler.

I use this instead of FTP for posting files to the Altuit website. Thanks to Jerry Daniels for letting me view some of his HTTP source code helping me to write this library.

Chris and I have developed the AltSAFileUp Library which should be compatible with file posting to webservers using form based file upload (RFC1867). In otherwords, it should work with Linux and Windows and has the following benefits over FTP.

1) don't have to maintain an FTP server with it's security issues
2) it's synchronous with your webapplication, so you don't have to check to see if a file 'got there'
3) you can process other form data along with the file at the same time. Just like an Asp or PHP page with forms on it, including an <item type=file>.
4) you could easily implement a file upload progress bar. If you're interested how to, let me know.

To implement you need a RFC 1867 compliant uploader like SAfileUp or other
on the server. The client can be any MC stack with the AltSAFileUp library.

FTP test stack
This stack will FTP a file for you. You need to set the server settings, the username and the password. Then click Load File and Send Up to ftp the file to the server.

If you build a standalone of this stack, it will also support drag and drop a file onto the icon with automatic uploading of the file to the designated server. Not much error checking going on here, but it's easy to read and see how things work. Drag and drop only supported for Windows. See the Metacard list for info on how to do Macintosh Appleevent drag 'n drop.
altURL Library
altURL command

The altURL command posts form data and gets query data to / from a web server using the POST and GET action of HTTP. It sends the completedMessage when finished. The HTTP response can be accessed from the custom property altURLResponse which can be checked in the completedMessage handler. This is valuable in processing redirects as well as callbacks. There are two ways to call this command. One is by passing separate values for all parameters, the other is by merging all parameters into one URL?QueryString.

altURL ReqType, Host, Page, formList [,completedMessage]
altURLget URL?QueryString [,completedMessage]
altURLpost URL?QueryString [,completedMessage]


example:

altURL "POST","www.altuit.com","test.asp",myList,"myHTTPresponse"
altURL "GET","www.ibm.com","tst.asp","name=jack&pswd=123","dothing"

altURLget "http://www.ibm.com?name=jack&pswd=123","dothing"
altURLpost "http://www.ibm.com?name=jack&pswd=123","dothing"

Parameters:
The Host is a valid URL to a web server.

The Page is an valid Page request (typically an .asp,.jsp or cgi page).

The formList is a list of Form or QueryString Variables and their respective contents. Each line of the list will have a name value pair. If you wish to use spaces or special characters, be sure to URLencode them first.

ex. This list variable sends two name value pairs:

password=fred124
username=johnny


The completedMessage is an optional message sent to the stack upon completion of the command.

The URL?Querystring is a valid URL with appended QueryString. Even though this is typical in 'get' and not 'post' commands, here it generates both. Note the http:// is required.


customProperties of altURL Lib:

altURLHeader - the header text being sent minus the Host and Page and Content Length

altURLTimeOutSecs - the time in seconds for altPostSAFileUp to quit.

altURLresponse - the HTTP response sent from the server or empty if no response. Use with the completedmessage parameter to get the HTTP response.

To install:
Copy the button altURL Lib into your stack. Then insert into the open stack or startup handler of your stack:

insert the script of btn altURL Lib into back

Then you can call the altURL command from anywhere in your stack.

For more info contact Chipp Walters
Portions of this script used with permission of Jerry Daniels. Muchos Gracias Jerry!

Splash Screen Stack
This stack creates a very interesting splash screen effect -- sorta like Kai Krause's MetaCreations programs used to do. It's actually quite simple, but the effect is astounding. All the code is in the stack script.

Notice the translucent butterfly wings. Feel free to use as you like. The executable is Windows only, but the effect should work on Macs as well (use the .rev stack)
Splash Screen Source Code
One of the interesting things about this Splash Screen window is the way it fades on. You can download the source code by clicking the link button below.
Add Comment:
Custom Tabs
Chris Sheffield asked about creating custom tabs. This stack should explain it.
altColorizeScript Library
This is a handy library which can colorize text in field based on rules for: HTML, XML and CSS. You can even roll your own colorization rules. I use it for some of my text handling stacks.
altResizeImgLib
by Chipp Walters, Altuit, inc.

This library allows you to resize and save an image with the 'best' resizeQuality of the engine while maintaining the aspect ratio. It can save in PNG, JPEG or GIF formats (if you have purchased the GIF unlock code from RR).

This DEMO stack
Press the Resize Image button and you are prompted for an image to open. Then you are asked for a filename to save as. Next, the altResizeImage command is called with the parameters specified by Maximum Height/Maximum Width and the pixel value.

If you set the control to Maximize Height, then the image height will be set to the height value specified with the width being whatever it needs to be to maintain proportions. If you set the control to Maximize Width, then the image width will be set to the width value specified with the height being whatever it needs to be to maintain proportions.

You can press the Open Viewer button to browse for and view the newly resized image.

How to install
Make the stack "altResizeImg" as a substack of your main stack.

Then use the commands:

start using stack "altResizeImgLib"
altResizeImage tFilePath,tFilePathToSave,tSize,tMode,tJpgQual
stop using stack "altResizeImgLib"

Where:
tFilePath IS THE ORIGINATING IMAGE FILEPATH

tFilePathToSave IS THE DESTINATION FILEPATH
NOTE: THIS HANDLER WILL LOOK AT THE EXTENSION OF THE FILE IN tFilePathToSave TO DETERMINE WHAT FILE TYPE TO SAVE AS. IF NO EXTENSION THEN DEFAULT IS "JPEG"

tSize IS THE MAXWIDTH OR MAXHEIGHT IN PIXELS. ALL IMAGES ARE RESIZED PROPORTIONALLY

tMode IS EITHER "MaxHeight" or "MaxWidth" AND TELL THE HANDLER WHICH ONE TO OPTIMIZE

tJpgQual IS OPTIONAL AND TELLS WHAT JPEGQUALITY TO SAVE AS. DEFAULT IS 90
altBuddyStack
The altBuddyStack library enables multiple stacks to 'dock' to each other, then be moved around as a single stack.
altAnswerColor
Tired of the lame answer color dialog in WinXP? Replace it with the altAnswerColor substack. Works in both XP and Mac. One of the coolest features is the ability to 'lift' a color from anyplace on the screen. Plus, it has access to the standard color picker as well.

Instructions for using:

Insert the substack "altAnswerColor" into your main stack. Then check out the script of the btn "set color" below to see how to call it.

Check out this card script for some RGB to HEX and HEX to RGB color functions.
altMakeTransparent
This is a small demo stack which has a neat function which can make a specific color transparent in an image.

The demo makes all white pixels transparent. The function is in the script of the button, "Make White Transparent"
ImageTransparency Demo
This demo has a Threshold slider for Image Transparency along with an eyedropper tool to select the color you want to make transparent.

It's amazingly fast, and includes many of the image libraries I often use.
Custom Button Objects
This stack can help you learn about how to create your own custom buttons. Click the Link button to download.
Launch Document Demo for XP
This stack will demonstrate how to simply launch a document with it's native application in XP.

Click the Picture to Download.
Gradient Demo
Shows how to create an image gradient via script.
altQuickTable
Uses just a normal list field with each 'cell' edited using a simple click. Now fixed to work with 1-column lists.
altEmailHarness
by Chipp Walters using Sean Shao's libSmtp253

Makes sending an email from your stack super simple.

This is a simple test stack for Sean Shao's fine SMTP library used for sending emails directly from Revolution. This stack works with the included library stack libSmtp253.

Included in this stack is a simple altSendMail function, which is a basic wrapper around Sean's libSmtp253 library.

Sean's library stacks are great, and they offer so many options...in fact, too many options! You can send HTML as well as Plain text, connect to various servers with different authentication schemes, and more! The reason I wrote this stack is to build a very simple test harness which allow you to send PLAIN text email directly from Rev.
Answer Dialog Patch for 2.6 and 2.6.1
The latest version of the Answer Dialog won't display extremely long words with no spaces correctly. This causes problems with filepaths and larger htmltext. Applying this patch will fix the problem and only grow the width of the dialog box when absolutely necessary.

This also applies the Tahoma font and correct fontsize to the dialog box as well.
altAnswerDate
altAnswerDate
This is a free wrapper for Sean Shao's fine calendarWidget which can be called simply like an answer dialog box. (Thanks again Sean for a great tool!!!!)


Technology by: Altuit, Inc. | top