Date: Tue, 1 Mar 2005 23:26:24 -0500
Reply-To: Richard Ristow <wrristow@mindspring.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Richard Ristow <wrristow@mindspring.com>
Subject: Re: Creating Dialogs for Macros?
In-Reply-To: <18788978.1109637649459.JavaMail.root@beaker.psp.pas.earthl
ink.net>
Content-Type: text/plain; charset="us-ascii"; format=flowed
This is a very partial answer. I don't know this area very well; on the
other hand, nobody else is responding...
At 07:40 PM 2/28/2005, michael healy wrote:
>I have written macros and I want to distribute at work. I'm pretty
>sure, however, that if people think they have to type anything even
>remotely code-like they'll never use them. How can I go about
>building a menu-driven interface for these macros? I would like to
>have the standard dialog format: a variable list on the left, the
>to-be-processed variables on the right, and maybe check boxes for
>options.
Probably the best facility in SPSS for this sort of thing is scripting
(SAX Basic scripting). I'm not familiar with it myself, but see if any
of the examples from Raynald Levesque's Web site can help:
http://www.spsstools.net/SampleScripts.htm#Dialogs
(If Raynald Levesque didn't exist, it would be necessary to invent
him.)
I don't know whether a SAX Basic script can "know" the variable list of
the working file, to put up the kind of dialogs the SPSS menus use for
commands: "a variable list on the left, the to-be-processed variables
on the right". Maybe Raynald's book has something on this?
The other thing I can think of is to create the dialog in any language
you like, write the results as a syntax file (probably as one or more
macro invocations), and run the syntax file. For doing that, see
http://www.spsstools.net/SampleSyntax.htm#BatchFiles
That would be OK for general prompting. It couldn't possibly have a
list of variables, though; it would have no access of any kind to any
SPSS working file.