Click the links below to explore the different sections of our site. If you have any questions about our products or services, don't hesitate to contact us.
Following are a number of links to pages that might interest you as a visitor of this web site.
copyright © 2005-07 by Mark Schonewille & Economy-x-Talk

Economy-x-Talk.com

Search the Sample Scripts Collection

Below, you find a list with over 300 script titles. Almost every single title refers to a script for SuperCard, Revolution, HyperCard, MetaCard, UserTalk, Perl, AppleScript, or another programming tool or language.

Enter a short keyword, which is directly related to the task you want to perform, in the filter field below. Keywords such as "file", "speech", "sound" and "dialog" (without quotes) are good. Phrases like "I want to make a stack for accounting" are wrong. You don't need to press enter or return.

If a script appears to be useful, please consider supporting the Sample Scripts database (see at the bottom of each script). If you would like to add a script, you are welcome to send it to for review.
Filter: 
Use this filter field to search the list below.
TitleDescription
Sample Scripts Stack

This card contains important information about the Sample Scripts stack....
A Different Way to
Hilite Text


Here's a way to hilite text in a slightly differeny...
Activate Application

This script uses Visual Basic to bring an application to...
AddColor Status Bar

Another discussion with Ken Norris, this time about drawing a...
Admin Rights

This AppleSript snippet is an example of how to make...
AltFont Docs

Documentation included with AltFont....
Answer & Ask UserTalk

A few more user examples: answer, ask, and answer with...
Answer and Ask with AS (nice)

Here's a solution for using AppleScript dialogs inside HyperCard and retrieving...
Answer AS

Compare this script with the Answer HT script....
Answer HT

Compare this script with the Answer AS script....
Answer Program AS Version

The AppleScript version of «answer program "Prompt"»....
Answer with QK in HT

Just an answer example, using QuicKeys....
AnswerFile AS

Choose a file using a nice file dialog and navigation...
Appearence Manager Stuff

A simple applescript to return the small system font of...
Application installed
or not?


This script tests whether an application is present on your...
Application Running or Not

This little script shows how to check whether an application...
Applications & Extensions

Get list of applications and their file extensions....
ArrowKeys

From Steve Drazga 12/87 This version was copied from the Developer...
ART HyperText Trick

This version was copied from the Developer Stack 1.1 DOUBLE CLICK...
AS Studio Review

Article. Press tiangle to read. Comes from AS ng. Written by Simon...
Ask & Answer Dlog
patches for Rev.


Every time when I update Revolution, I apply these patches....
AskFile() AS

An AppleScript script that uses navigation services (if available) rather...
Autorun CD

When someone inserts the CD into a Windows PC, it...
BackUp AS

"Here's my script of Backup (for OS pre-X only) in...
BackWards Linewise and Textwise

Hi all, How are things going? I wrote a little script...
boingharmony

This script demonstrates using sound channels. Probably, this one is...
Call a Script AS

Call a script from another script....
Case Sensitive Offset

HyperTalk case sensitive offset function....
Case Sensitive Offset (CompileIt!)

COMPILEIT HANDLER - This script should compile in the demo...
Case Sensitive Offset w/delete

HyperTalk case sensitive offset function....
Center Window on Screen

The screenRect is the rect of the current card window's...
Center Window Relative
to Card Window


This is a short script that returns the coordinates of...
Center Window to Screen 2

This function uses the window ID to avoid problems with...
CenterImage

Script by Colin Holgate to move the card picture to...
Change Folder Icon

Change icon of a folder to icon of a particilar...
Change Mail's default
text display


Changing Mail.App's default display setting for e-mail messages from html...
Change Name Folder Action

This folder action changes the name of a file that...
Change Permissions

Here is an easy way for changing permissions. This is...
Changing Location AS

> Howdy, > > I note that the Location Manager control panel...
CheckWidth()

This function returns the text width of a field. It...
Choose from List AS

This AppleScript shows a dialog with a list and lets...
ChooseFolder

An example of selecting a folder using AppleScript, which uses...
ChooseFolder() AS

An AppleScript script that uses navigation services (if available) rather...
ClickCentral

Geoff Johnson-Brett, July 2003. _____________________________ Click anywhere INSIDE...
ClickLine Fun

A way to get the clickLine only if it is...
Clip2File

> Hi Ben, > > Actually, it is not a problem if...
Clock

This is a clock I made once, try to figure...
Close Apple Guide Upon Quit

The problem of Apple Guide is that its windows don't...
CNTL Resource

>How do I use those? Well, create a 'CNTL' resource and...
Color button animation

1. create a series of icons to "animate" using Hypercard's...
Color Text (CompileIt!)

COMPILEIT HANDLER - Syntax Example: put the rect...
Colour Hilites

The buttons on the left show a few different ways...
Colour Printing

1. Take any picture, including color, and put it into...
Combinations

The Combinations function returns all possible combinations of characters in...
Combine PDFs

Hello group, A couple of times I and others have asked...
Cond'l Idle B&W Indicator

Not a very good conditional idle handler, but a nice...
Conditional Idle

This script makes a button blink if the mouse is...
Controlling tabbing order

Tab takes the cursor to the next unlocked field, so...
Convert Garbage2Text

Sometimes, when I copy text from a PDF file, the...
Convert QuickTime Files

Ok... I'm no scripter myself, so I turn to...
Copy Color Data

Copy a colorized card and paste it, with all...
Copy Objects from/to a Stack

Here is a script that re-creates (instead of copies) the...
Copying objects with SuperGrouper

One way of copying multiple items is through Super Grouper...
Count Instances

A quick way to count all instances of a particular...
Countdown Timer

Here's one way that displays the remaining seconds (from 3600...
Countdown Timer 2

Here is a different version that displays the remaining time...
Countdown Timer 3

Display time on the card by placing a field onto...
Country Code

This script returns the country code of your localized system,...
Create Alias to Application

Create an aliuas to an application on Mac OS X. ...
CreateFolder() AS

Use AppleScript to create a new folder at a particular...
Creator Types and File
Types AS


Two scripts to set the creator and file type of...
Csv2vcf Conversion

This script by Paul Foraker, largely based on the work...
Dates Comparing Trouble

This script illustrates a problem with comparing dates....
DaysBetweenDates

subtracts endDate from startDate and returns days note same days...
DecToHex

Jon Bettancourt's decimal-to-hexadecimal handlers look like they should do the...
Default Find (String) Command

>Thanks for the several responses, which got me digging.... > >Turns out...
Dehilite Field on OpenCard

To make sure that no line is hilited in a...
Delay AS

An AppleScript example, showing the use of an ask dialog...
Delete Files and Empty Trash

An appleScript to delete the contens of a folder and...
DeleteFile()

The AppleScript deleteFile show how to delete files. Don't try...
Deleting Cards Unintentionally

This script prevents deleting cards unintentionelly....
Dialog with Timeout and Error

"Kev-mo" > I'd like the dialog box to remain...
Do text as HyperTalk

This script runs a selected HyperTalk script in a text...
Download with AS 2

A slightly better download, it seems. If there is not...
Download with URL Access

This script downloads a picture from the internet and has...
Drag N Drop files (AppleEvents)

Modify HyperCard's BNDL resource so you can drop clippings or...
Drag Text

This script deals with card fields, but you can change...
Draw Circle and Check Point

You can draw a circle by plotting sin(angle) *radius, cos(angle)...
E-Mail Address Scrambling

Here's one simple way to scramble an e-mail address in...
E-Mail Body Text

Get the body text of the currently selected e-mail in...
Eject Volumes AS

papiz wrote: | how to distinguish a cd/dvd from an hard...
Empty Temporary Items fldr

This script empties the temporary items folder. You can ignore the...
EmptyClipboard()

This script tests whether the clipboard is empty ...
Environment Variables
for Unix


A list of unix environment variables that can be used...
Error catching and find
line in script


After quite a long discussion on the HyperCard Mail List,...
Error Handling in AppleScript

Errorhandling in appleScript : onderaan vind je een vb. ...
Exchange Data with Excel

Sure... this is based on modifying the "put ... into...
Export HTML

Click the Export HTML button to try this demo script....
Export TEXT Resource Content

Exports name, ID and content of TEXT resources to a...
Extract Words (http)

Extract words is a function that finds web addresses in...
Factorial

This script safely handles any value, including "ten" and "3*(8/4)":...
File Associations

An E-Mail from Ken Ray to the Revolution Use List...
FileAtRoot

FileAtRoot: a function that determines if a file is present...
Filename with Matchtext

A matchtext version which returns the short name of a...
Find Again and again and...

This is a script that keeps finding occurrences of a...
Find Again...

Please, click the doFind handler only and then press commandKey-G. Following...
Find Styled Chunks

Finds any named style in text. Takes a field name...
Folder action on
opening fldr


An example of a folder action. Create a script in script...
FolderList

This is another example of a script that creates a...
Get BG Card Number

If you have two backgrounds which are mixed, for example...
Get Dimensions (Arrays)

Some array faking stuff....
Get FileModDates AS

Original script by Michelle Steiner. This script return a list of...
Get HC Path Name

Returns the path to the file....
Get MAC address

Two functions to help you find out the MAC address...
Get Subfolders

This script demonstrates how to retrieve a list of folder...
Get Subfolders 2

Hoi Rob! It was a nice and interesting...
Get/Set Creator

Here are four sets of HyperTalk handlers: 1. get the creator...
getASCIIList()

Alright then. Here is a brief function that created a...
GetBrowser()

This script returns the creator type of your browser. It...
GetFullPath

This is a function to find the full path name...
getMostFrontApp() AS

Functions that returns the frontmost application. If you run the script...
getStartupItems

Script to get a list of startup item of the...
GetVolumes

This script uses AppleScript to return a list of all...
GlobalMouseLoc

The function globalMouseLoc returns the mouseLoc relative to the topleft...
Hardwrap text

The hardwrap handler puts returns after each line of a...
HC Mail List Info

You can join or change settings at this web address:... Click...
Help Balloon with
Styled Text in Finder


To create a Finder help balloon for an application of...
HexToDec

H2d and hexToDec2 don't work or they do work but...
Hide Application in
MacOS X


To hide an application process in MacOS X, open the...
Hide Process from List

Hide process from list. Put this script into an applet. Run...
Hiding stay-open applets

Create your script saving as an applet, and be sure...
Hover and Hilite
without Clicking


Here's away to hilite text in a field without clicking....
How to stream the movie

--- Devin Asay <Devin_Asay@by....> wrote: I was thinking about how...
HyperCard FAQ , The
Basics - Part 1


HyperCard FAQ - The Basics A text-based view of the HyperCard...
HyperCard FAQ , The
Basics - Part 2


HyperCard FAQ - The Basics A text-based view of the HyperCard...
HyperCard FAQ , The
Basics - Part 3


...
HyperCard Past & Future

This article comes from the Apple website http://www.apple.com. I think...
HyperCard? Is that
still around?


Article © by Jonathan Cooper 19 Dec. 2000 Click the triangle to...
HyperLinks in Text Fields

Use this script in a field script to make e-mail...
HyperTalk Runner

This AS script runs HT syntax. Save it as a droplet...
Icon List Fields

This card shows how to put B&W icons in a...
IDE Version

This function reports the IDE version for MC or Rev,...
Idle in AS

I'm a newbie too, but may be this script help...
Index

Welcome to the Sample Scripts Stack web site. On these pages,...
Info-Mac Submission G'lines

Click triangle to read article....
INI file information

Does Rev support an INI type external file structure? I...
Interface Colour Hilite Button

This script produces colorized hilites for buttons. Adjust this script...
Interface SetUp

Here is a script that uses AddColor to quickly colorize...
International OffSet

Returns offset of string accounting for international characters....
IP by Perl CGI

Put this simple perl script into the cgi bin of...
IP Number

Use this AppleScript to retrieve your IP number. Note that the...
Itemoffset

Finds the offset of an item in a string. In...
JavaScript example

The script on this card is an example of JavaScript...
Jeanne's House o' HyperCard

Article © by Jeanne A. E. DeVoto 19 Dec. 2000 Click the...
Justify()

Here is a little ditty, hope you folks enjoy it,...
Keep Text Style and
Size of a Field


Use this set of scripts to keep a the text...
Key Chain

Instructions: 1. Fill in your keychain name and it's password....
Label of Menu Button Changed

Find out if the label of a menu button has...
Last HC Item

Returns the portion of <theText> that follows the last <delim>....
LastPathComponent

LastPathComponent given a file pathname, returns the last component i.e....
Linefeed Remover

This applet removes the linefeeds from a text file. Since...
List Selection Without Clicking

Another example. This one allows the user to select list...
List speech feedback 1

Itis important that the list field has actually a name...
List Speech Feedback 2

Another example of a list with speech feedback, now without...
List Speech Feedback 3

Run SelectFirstItem to select a line or select a line...
List Speech Feedback 4

Another one......
Lists of Paired
Variables in AS


A script fragment that shows how to put values into...
Little Endian

Here is a function to convert big endian data to...
Load OSAXen

This AppleScript snippet loads OSAXen. You can install an OSAX...
Local IP

Use this function in Revolution to get the ip address...
Lock Symbol in Menubar

The lock is the capital letter A in the NFNT...
LockErrorDialogs

Two ways to deal with errors. It shows the use...
Log User Actions

This script shows a way to log user actions. Click the...
Long File Path and DragDrop

The hashLongFilePath function takes a hashed shortened file name and returns...
Longestword

Find the longest word in a field...
MacsBug Explanation

A very basic though useful explanation of MacsBug, a tool...
Making Standalone Icons

STEP BY STEP: 1) Give the standalone a custom...
Marcation Buttons 1.0

(From a discussion in the newsgroup) Here's a solution for...
MatchText

This is an example that shows one way to use...
MaxScroll

This function returns the largest possible value of the scroll...
Menus and Keys

Subject: Re: menus, keys Date: Mon, 21 Jan 2002 20:44:24 +0000 From:...
MouseDoubleClickTest

A test to find out how quickly people do a...
Move Button in Circle

The title says it all. Read the comments and click the...
Move Button within Rect

Two ways to move buttons within a restricted area....
Move Screenshots to
Folder Applet


An applet to move screenshots from the root of your...
MoveWindow CreySoft

Here are three solutions by three different authors to move...
MoveWindow Karl Petersen

Here are three solutions by three different authors to move...
MoveWindow Uli Kusterer

Here are three solutions by three different authors to move...
Moving styled text in fields

You can move text from one field to another, preserving...
Multiple card views

In order to build several "views" onto a single background,...
Multiply Matrices

This function multiplies two matrices. More matrices can be multiplied...
Navigate through Fields
by ArrowKeys


It is not recommended, but you could use arrowkeys to...
noButtonDelete

NOTE: Handlers are included in the Function section for convenience. If...
NoFieldDelete

NOTE: Handlers are included in the Function section for convenience. If...
Nr of days in current month

brett wrote: Is there a call i can make that will...
Nu Šr det slut

What follows is a short explanation from the HyperCard newsgroup...
NumberOfChars

A utility function that tells you how many times a...
Numbers to Text

Converts numbers to words....
Objects list

Two property handlers which return a list of objects of...
Open App by creator
code AS


Fred wrote: Fred <noway@jose.com> wrote: This is a very simple script that...
Open Control Panel

Use this chunk of AppleScript to open a control panel....
Open File from Finder

This HyperTalk script show the use of apple events in...
Open Folder in Finder
with AS


Two ways to open a folder using AS in HT,...
OSAX in Resources

Subject: Re: trash Date: Sat, 16 Nov 2002 09:56:04 +0100 From: not_a_mailbox@empty.org...
osErr

NOTE: Handlers are included in the Function section for convenience. OsErr:...
Other OSA lang's in RunRev

UserTalk scripts can be executed in Revolution, using a do...
Owners

Returns a list of all owners of an object. Very...
PassWord function

The function pw("string") returns a code which is similar to...
Paste to and from other applications

Q: "I wanted to know if there is an Hypercard...
Paths to special fldrs

Using AppleScript, it is possible to retrieve the path to...
Permutations

Here is an all-purpose script which is pretty quick as...
Permutations 2

A very inefficient way to calculate permutations. Not worth trying....
Pict2GIF

The PICT2GIF script can be used either as a script...
Picture in Button

This card contains a button. The icon of the button...
Picture Map

This is the result of a discussion with Ken Norris...
Ping

>/ In Revolution, which function is better for calling a...
Play Movie Full Screen

Here is a neat button script that plays a QuickTime...
Play Movie Full Screen 2

Here's a HyperTalk handler that accomplishes a similar task from within...
Play Series of Movies

Plays a series of movies in a loop. Put the...
PlayMovie

A script that show how to use the standard QuickTime...
PopUp Problem

Lots of experimenting, here. Also lots of problems. No solution...
PostScript Code

This script creates a tiny postscript file, just by vanilla...
Postscript Trouble

This is a printing experiment. It doesn't work, but it...
PowerCreate

NOTE: Handlers are included in the Function section for convenience. These...
PowerToggle

NOTE: Handlers are included in the Function section for convenience. This...
Processes on Mac OS X
and Win XP


My approach has been to loop through all registry keys...
Quit your standalone

This script shows how to quit your Revolution project properly....
Read-write NULLs

Just write an AppleScript which reads the file and converts...
Record and Play Paint Draw

This goodie contains of three scripts: a recording script, a...
Remove dock icon

Don't display the icon of your Revolution standalone in the...
Remove sticky files
from trash


This is a complete AppleScript applet to empty the trash....
Render Text to Sound

An AppleScript to save written text to a sound file,...
repeatWithSound

This script shows that it is possible to play sound...
Replace 1st Char of
Each Word


Replace the first character of every word with a different...
Replace String in Scripts

Search and replace a word or string in all scripts...
ResEdit's location AS

You can't easily get the path to the running process...
Reset MIDI settings
with AS


A script from the Rev Use List. The following procedure should...
Resizable Fields - DQDIM

A Trick by D. J. Downs. Drag the small dot between...
Resolution of JPEG images

An idea of Dar Scott to change the print resolution...
ResolveAlias AS

After using the "choose file" dialog and choosing an alias...
RetrieveMailAddresses()

...
ReturnKeyInField

This version was copied from the Developer Stack 1.1 This will...
Revert List using Array

The reverseList function puts a list up side down, starting...
Right Angle with
Animation Engine


Enter two points. The function calculates a point exactly in...
Rotate a picture file

A script that chooses a file, reads it, rotates it...
RotatingOval

On a white background and without the line "addColor colorCard"...
Round-Up

This is a one-liner that always rounds upwards....
Run OSX shell script
with password


Here is how to run a shell script with password...
Safari (AS)

Here are four functions that retrieve information from Safari for...
Save all files in BBEdit

Save all files in BBEdit...
Save Copy of File or Stack

Two ways to save a copy of a file. SaveCopy...
Save Dialog

A sace dialog using AS....
Save Way to a Quit Standalone

A fail-safe way to quit your standalone. This script makes sure...
Script2HTML

Here is a set of handlers for transforming a HyperTalk...
Scripted Drawing

This script was written by someone called Mary and slightly...
Scrolling Text Button 1

This version was copied from the Developer Stack 1.1 OPTION CLICK...
Search/replace with wildcard

Nigel Garvey pointed out a way to make a tremendous...
Select Wrapped Lines

Example ©2005 by Mark Schonewille http://economy-x-talk.com for John Balgenorth This handler selects a...
Selectedline anomaly

The selectedLine of a list field is perdurable. That is,...
SelectedTextRect

This function return the rect of the selected text. MS...
SelectionFun

Select this text to see what the script on this...
Send Mail with Outlook

> Hello > How can i send emails with attachment with...
Send Mail With Outlook II

Depending on the version of Outlook, the previous Send Mail...
SendEMail With Eudora Lite

Hi Shari Before you give up completely on AppleScript as a...
Server Script for Revolution

This is a very simple server script that may get...
Set Layers of Grouped Buttons

It took a little effort, but it was a fun...
Set modification date

To get the modification date on Mac OS X, use...
Set Theory Implementation

Q: Hello all, Does anyone have code that implements set theory. For...
Set Window Appearance

This script lets the user select a folder and set...
ShowScripts

By Steve Drazga 12/87 This version was copied from the Developer...
ShuffleList AS

Someone wrote: > Does anyone know a good way to do...
ShutDown

Here are a few ways to shut down your system,...
Simple AS Error Handling

To handle errors in AppleScript, use a Try Statement --...
Sleep Time

Here are three scripts for Mac OS X. The sleepTime function...
Smooth QT Playing

> >I tried preroll ; there is always a...
Smooth Scroll

Nice feature by Ken Norris. This script scrolls a field rather...
Sort Lines

Sorts lines of a container....
Sort Numbers

Numerically sorts a string of numbers (i.e. "27 10 52...
Sound Synchronisation

A few sound synchronisation experiments....
SPAM Punisher

SPAM Punisher with Outlook. Since I try to avoid using M$...
Speech Feedback from Objects

This script shows how to get speech feedback while pointing...
Speech Sample

Here is a brief speech sample....
Splash Window Scripts

These scripts show how to do a splash window. It...
SSH on OSX

An article by Jaque Landman Gay about SSH with Revolution...
StartUp Chimes Trick

It's amazing how many times people ask about...
String After Target String

Returns the string that appears after target string in source...
String Before Target String

Returns the string that appears before target string in source...
String In Is Container

Checks to see if theString is a full line of...
Strip Leads and Trails

This will strip leading and trailing whitespace from a multiline...
Suffix Droplet

This very simple script adds a .txt suffix to all...
TabToComma/CommaToTab

Just what it says....
Text File to Sound File

An AppleScript to convert a written text document to a...
Text to Line Number

Returns the line number of target text within the source...
Text2Speech Recording

Here is a shell command: $ say -o mail.aiff "You got...
The Suspended

An idle loop that applies the suspended function....
Time retrieval and comparison

This script produces the current time and compares it with...
TimeFun

An example showing how to use seconds, days, hours, and...
Timer for RunRev

A very simple timer for Runtime Revolution. Copy the script...
Trash Size on OS X

TAn AppleScript function, which returns the total size of all...
U3 drive path for files

here is what I found with help from the mothership...
U3 Serial Number

I decided to find a way to get a U3...
Uniform to normal

The following computes the simple inverse; that is, it takes...
UpdateIndex

An indexing trick. Don't try it, it will destroy this...
Upload File AS

Upload a file using ftp and URL Access Scripting. You may...
URLEncode

This card shows two functions. One function, hexValue, converts ascii...
User Language

Great function to retrieve the user language of your system....
UserTalk Examples

This card contains several UserTalk examples. The first script is...
UserTalk Samples

The "This was a mouseUp" message is sent to UserLand...
Using Forward Delete
Key in HyperCard


Alejandro Tejada: I've been looking in the Mail List ...
Visibility of File in OSX

Setfile is a command line utility included with Apple's Developer...
VolumeName

Given a file pathname, returns the name of the volume...
WeekOfYear

Sure, but this is the kind of thing that you...
What is the most
scriptable database?


My comments to the statement that HC is "Rudimentary and...
When you reach the 32K limit

Article by Mark Schonewille, Nijmegen, The Netherlands, 2002 Click the triangle...
Window Library

This script pops up a picture with the windows that...
Word2RTF with AS &
Visual Basic


These scripts open a WORD 8 (or Word 2001) file...
Write Folder Contents
to File


wee wrote: > Hi, > > In one of the mac magazine I...
WriteData AS

Since upgrading to OS 9.2.2 (as solo system, not as...
xBytes

This function provides a way to enter an amount of...
XML Library

An XML library by Marielle Lange. Also see http://www.widged.com. Please...
XML Pull-Parser

I have found that large data files can be broken...
Zoom

"It's all a matter of personal choice isn't it. :)...
Contact us for information about our announcement programme or click to rent.
Contact us for information about our announcement programme or click to rent.