programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

New FAQ Post: Executing ShellExecute using Params from a Text Fil e

From: Bob Nash <BNash_at_smud.org>
Date: Fri, 22 Nov 2002 10:21:24 -0800

My recent post to the FAQ is located at:
http://www.forth.com/cgi-bin/swiftforth?file=176

The posted code produces a turnkey executable, SHEX.EXE, that will perform
the ShellExecute API call using parameters specified in a text file. The
default name of the text file is SHEX.txt, but you can specify any file you
want as a commandline parameter (e.g., SHEX my text parameters.txt).

This program was developed for a Windows TCL/TK application that needed to
bring up the user's default browser on a URL specified in a text file (e.g.
by shelling out to SHEX). The ShellExecute API call is aware of user
preferences associated with file types (e.g., which editor to use with .TXT
files). Note that ShellExecute also allows you to bring up "mailto" dialogs
with the subject line pre-filled. See the source for various sample calls.

SHEX (formerly SEXE) is not particularly useful beyond this kind of
application, but does show how I handled things such as creating an
unregistered Windows app. (thanks to Mike Ghan), parsing parameters from an
input file (klunky but functional), and stripping CRLFs (ho hum).

As usual, comments and criticisms are welcome.
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe sftalk" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/sftalk -- check them out!
Search the archives! Visit http://www.forth.com/search for details.
Received on Fri Nov 22 2002 - 10:19:43 PST

This archive was generated by hypermail 2.2.0 : Fri Nov 21 2008 - 03:04:25 PST