Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!umd5!ames!necntc!rayssd!raybed2!lah
From: lah@raybed2.UUCP (LANCE HOLMES)
Newsgroups: comp.sys.amiga
Subject: WBarg problems
Message-ID: <1084@raybed2.UUCP>
Date: 15 Dec 87 17:51:35 GMT
Organization: Raytheon Co., Bedford, Mass.
Lines: 29
Keywords: workbench arguments xicon Iconexec


I've written a simple program that has a simular purpose to PD programs
called "XICON" and "ICONEXEC".  It would allow a user to double click
on a project icon who's file contains a series of CLI commands and execute
them.  After double clicking on it workbench would start the program
listed in the icon's Default tool.  It would then run the program and
send a WBenchMsg to the program which would contain the name of the file
who's icon had been clicked on. The program would then take the filname
string and concatinate it with the string "Newcli FROM " to look like
strcat("Newcli FROM ",filename) .  This string would next be the argument
for the dos function Execute.  The program utilizing the new capablities
of the Newcli program would then open a cli window and start executing 
the commands in the file.

I am sure that I have declared every thing correctly such as WBenchMsg.
I used the technique with respect to workbench args found in 
the PD program Viewilbm. FF#44
I am getting the name of the file correctly.
I even went to the trouble of trying to copy the file to ram and then
using the ram filename to execute it.
I have hard coded the name of the file into the program and it works 
like a charm, so the Newcli function will work even though a cli window 
isn't open.

I'm at wits end and would appreciate any useful suggestions.
I'ts a simple program and would, if it worked, have great power in that
any executable command file could be run from the work bench.
I hoped to open a cli window and start Steve Drew's Shell program from
the work bench .  A friend was going to use it to run DiskChange DF1:.