Launching the Calculator

Ken Ray kray at sonsothunder.com
Wed Mar 14 09:30:00 EDT 2007


On Wed, 14 Mar 2007 06:13:08 -0700, Mark Greenberg wrote:

> Two students of mine are building a stack to give learners some 
> practice with the concepts of mean, median, mode, quartiles, and 
> range.  They asked me whether they could have a button in their stack 
> that launches the calculator that comes with windows (chiefly so the 
> students can add and divide for mean).  So I'm asking the list 
> members.  Keep in mind that these students have less than 2 hours so 
> far of programming experience whatsoever, so shell commands and 
> externals would be too much for them.  They are working on Windows XP 
> to compile for Windows.

    launch "C:/Windows/Notepad.exe"

However if for some reason the main Windows folder was renamed (some 
people do this on install), you can get the path to the current Windows 
folder using specialFolderPath:

    put specialFolderPath("system") into tWindowsDir
    launch (tWindowsDir & "/Notepad.exe")

Hope this helps,

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/



More information about the use-livecode mailing list