ftp.nice.ch/pub/next/developer/languages/cows/COWS.1.4.s.tar.gz#/COWS/Apps/Mac.rtf

This is Mac.rtf in view mode; [Download] [Up]

Copyright © 1994 by Sean Luke

Mac.app
COWS Version 1.4
May 20, 1994


Mac is a small event-macro recorder and player designed to work with COWS.  Mac's chief purpose is to allow COWS apps which support the IPC library to be able to control a wide variety of NeXTSTEP applications, not just other COWS-compliant ones.


Event Macros

Event Macros are records of keystrokes and mouse movements.  Playing a macro allows you to tell the computer exactly how to perform a specific common task on your computer by actually doing the task, and then telling the computer to remember what you did.  Event macros are relative to windows and applications and not to the screen, so if the position of an application's window changes while playing back a macro, it'll still work.


Recording a Macro

You record a macro by pressing the record button on the console.  A save panel pops up asking you what you'd like to save your macro as once you create it.  Type in the name of the macro file and press Okay to start recording, or Cancel to cancel recording at this point.

Now, go ahead and do something, like type a letter or do some common mundane task.  When you're done, press the stop button on the console, or (better) hold the alt button and press the right button on your mouse.  Either of these actions stops the macro recording and saves the macro to disk.

Macros are saved with the .mac extension.


Playing a Macro

Playing a macro back is easy.  Just press the play button on the console.  An open panel pops up asking you what macro to play.  Pick the macro you want to play, and press Okay to play it.  Or press Cancel to decline starting the macro.

When a macro plays, it fights with you for control of your keyboard and mouse.  For this reason, although you can stop a macro playing at any time by pressing the stop button on the console, it's not always easy to do so!  You can press a key at any time to stop macros (the easy way).


Controlling Mac from COWS

Mac supports the COWS IPC library, which means you can control it with the IPC functions send, send-out, etc.  The function you send to Mac is play, which is defined below:

play		Plays macro macro.  Only accessible through the COWS IPC Library.
		macro may be a pathname to a macro, as in  /Users/sean/huh.mac, an
		actual macro I use.  Or if your macro is in /LocalLibrary/Mac or 
		~/Library/Mac, or Mac's app-wrapper, and your macro ends in the
		extension .mac, you can refer to it directly by name.  For example,
		to play the macro /Users/sean/Library/Mac/GrabMail.mac, you can
		just use GrabMail.
	(play macro)

Examples: 		Since play can only be used within the context of the IPC
			Library, IPC function examples are given.
		
	 	(send "Mac" "play" "GrabMail")
		(send-out "Mac" "play" "/Users/sean/huh.mac")
		(set x "/Users/sean/info.mac") (send "Mac" "play" x)
		(send-out "Mac" "play" "It")	
			...on my computer, this is the same as
		(send-out "Mac" "play"  "/Users/sean/Library/Mac/It.mac")

Thanks to Dave Griffiths for his Pupetteer object code, which served as the inspiration to this little application.

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.