![]() (With apologies to the good citizens of Freedonia )įile.getSpecialFolderPath, file.type, file.fileFromPath, dialog.yesNo and file.newAlias are examples of calls to built-in verbs. ![]() ![]() For example, in Fredonia version of System 7, this call will return Sturgeon:Smidgadzchen Festerest:Apfel Menu Gethingies. We could have hard-coded a path to the Apple Menu Items folder, but by calling file.getSpecialFolderPath this script will work on any Macintosh, in any country. By saying we want to go to infinite depth, the loop will visit all files in all sub-folders, no matter how deeply nested. If the path is the empty string, fileloop will loop over all mounted disks. fileloop is a special construct in UserTalk, it allows you to iterate over all the files on a disk or in a folder. If you click on Yes, the script calls the Frontier built-in file.newAlias verb to create the alias in the Apple Menu Items folder. The script loops over all files, and when it finds one whose type is 'APPL', it displays a yesNo dialog asking if you want to create the alias. If dialog.yesNo("Create alias of " + name + " in Apple menu?")įile.newAlias (f, appleFolder + name + " alias") If file.type (f) = 'APPL' «its an application Local (appleFolder = file.getSpecialFolder ("Apple Menu Items"))įileloop (f in "", infinity) «scan all disks, to infinite depth Lets look at a more comprehensive script that creates aliases of all applications on all hard disks in the Apple Menu Items folder: This displays the string in Frontiers main window: Heres what Hello World looks like in UserTalk: Theres a long tradition of introducing languages with a simple Hello World program. The goal of the language is to make it easy to write utilities that operate at the system level launching and communicating with applications, managing the file system and operating system and other system resources, and moving information around a network. The language is very tightly integrated with Frontiers object database, discussed in the Storage System section, below. UserTalks syntax is most like C or Pascal. UserTalk is a full-featured language, with looping, if-then-else, case statements, local and persistent variables, subroutines, error recovery and automatic type coercion. ![]() In the following sections we break out each of the major features in Frontier and discuss them using sample scripts to demonstrate the features. All the examples in this article work with Frontier 2.0. Scripts can also be embedded in a small application to allow collections of files, folders and disks to be dropped onto the script.įrontier 1.0 shipped in January 1992 version 2.0 shipped in October 1992. Frontier provides a script editor/debugger, table editor, menubar editor, documentation tools and a comprehensive set of built-in verbs that allow you to customize and automate the Macintosh file system, operating system, networks, utilities and scriptable applications.įrontier scripts can be saved to the Finder desktop, can be linked to menu items, and can run in the background. The goal is to show how the language and the environment work, but not to be a complete tutorial in using Frontier.įrontier is an integrated collection of development tools built around a scripting language and disk-based storage system. This article is a top-level technical overview of the UserLand Frontier scripting system, written for experienced C or Pascal programmers. Frontier 2.0 received MacUsers Eddy award for best development tool of 1992. Living Videotext merged with Symantec shortly after that and Dave moved on to start the development of Frontier. he shipped one of the first Macintosh applications, ThinkTank 128, in mid-1984, and in 1986 shipped the award-winning MORE 1.0, followed by MORE 1.1c in 1987. As founder and president of Living Videotext, Inc. Dave has been a commercial software developer since 1979, and shipped his first product, the ThinkTank outliner for the Apple II in 1983. He and Doug Baron are the lead developers at UserLand. Note: Source code files and Runtime Frontier accompanying article are located on MacTech CD-ROM or source code disks.ĭave Winer is founder and president of UserLand Software. Educational Institution and Student Discountsįrontier Guide Volume Number: 9 Issue Number: 8 Column Tag: ScriptingĪ top-level technical overview to the Macintoshs first scripting system.
0 Comments
Leave a Reply. |